帮我看一下这个复制的问题吧

cbs1031 cbs1031 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Dim str1 As String
Dim str2 As String
Private Sub copy_Click() '复制函数
str1 = ExplorerList1.FileName '得到原文件的完整路径
End Sub
Private Sub del_Click()
Dim str4 As String
str1 = ExplorerList1.FileName
Kill str4
ExplorerList1.RefreshList True
ExplorerTree1.RefreshTree True
End Sub
Private Sub ExplorerList1_FolderClick()
ExplorerTree1.FolderClick (ExplorerList1.FileName)
End Sub
Private Sub ExplorerTree1_TreeDataChanged()
On Error Resume Next
ExplorerList1.TreeDatas = ExplorerTree1.TreeDatas
End Sub
Private Sub Form_Load()
ExplorerTree1.InitialDir = "c:\windows\system"
End Sub
Private Sub Form_Resize()
ExplorerTree1.Height = Me.ScaleHeight
ExplorerList1.Height = Me.ScaleHeight
End Sub
Private Sub icon_Click()
ExplorerList1.view = 0
End Sub
Private Sub list_Click()
ExplorerList1.view = 2
End Sub
Private Sub New_Click()
ExplorerList1.CreateDir
ExplorerList1.RefreshList True
End Sub

Private Sub paste_Click()    '粘贴函数
Dim str3 As Integer
str3 = ExplorerTree1.Path '拷贝到目标文件夹的路径
FileCopy str1, str3
End Sub
Private Sub report_Click()
ExplorerList1.view = 3
End Sub
Private Sub smallicon_Click()
ExplorerList1.view = 1
End Sub

我解决不了取得一个文件的文件名的问题,就像在c盘下的1.txt文件,我得到了
"c:\1.txt"的字符串,但是我还想要一个"1.txt"的字符串,应该怎么做呢?

...全文
评论 10
收藏 已收藏
分享
返回顶部
cbs1031
控件 1,453 成员 41,351 内容