vb中如何将一个文件的所有东西复制到另一个文件夹
展开全部
Private Type SHFILEOPSTRUCT
hWnd As Long
wFunc As Long '是复制、删除还是移动
pFrom As String '源文件夹或文件
pTo As String '目的文件夹或文件
fFlags As Integer '是否显示个子对话框
fAborted As Boolean
hNameMaps As Long
sProgress As String
End Type
Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
Private Sub Command1_Click()
Dim SHFileOp As SHFILEOPSTRUCT
SHFileOp.wFunc = &H2
SHFileOp.pFrom = "C:\xyz.z" '源文件夹或文件
SHFileOp.pTo = "D:\aaz.z" '目的文件夹或文件
SHFileOp.fFlags = &H40 + &H1
SHFileOperation SHFileOp
End Sub
hWnd As Long
wFunc As Long '是复制、删除还是移动
pFrom As String '源文件夹或文件
pTo As String '目的文件夹或文件
fFlags As Integer '是否显示个子对话框
fAborted As Boolean
hNameMaps As Long
sProgress As String
End Type
Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
Private Sub Command1_Click()
Dim SHFileOp As SHFILEOPSTRUCT
SHFileOp.wFunc = &H2
SHFileOp.pFrom = "C:\xyz.z" '源文件夹或文件
SHFileOp.pTo = "D:\aaz.z" '目的文件夹或文件
SHFileOp.fFlags = &H40 + &H1
SHFileOperation SHFileOp
End Sub
展开全部
这个可以用dir遍历文件夹 filecopy复制
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
FileCopy函数·······
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
所有东西是指什么
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询