VB将当前文件夹中文件复制到指定位置
发布网友
发布时间:2022-04-28 20:34
我来回答
共3个回答
热心网友
时间:2022-06-23 02:43
先在“工程”菜单里选择“引用”,复选“Microsoft scripting runtime”-确定(使用FSO文件操作系统)
Private Sub Form_Click()
Dim MyFSO As New FileSystemObject
Dim MyFile As File
Set MyFile = MyFSO.GetFile("文件路径名称")
MyFile.copy "D:\"
End Sub
热心网友
时间:2022-06-23 02:44
Private Sub Command1_Click()
FileCopy "c:\1.txt", "z:\1.txt"
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
If Time = #12:00:00 PM# Then kill "z:\1.txt"
End Sub
热心网友
时间:2022-06-23 02:44
FileCopy "目标文件","复制到什么地方" 文件的扩展名不能忘记写