Dim objFile As New FileSystemObject objfile.CopyFile "c:\工资数据表.dbf", "d:\工资数据表.dbf", True
不行,出错“用户定义类型未定义” Private Sub Command1_Click() exec xp_cmdshell 'copy c:\program files\我的音乐 d:\我的音乐' End Sub 上面“EXEC”是什么,如何使用?
Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As LongPrivate Sub Command1_Click() CopyFile "c:\test.txt","d:\new.txt",1 End Sub
Private Sub Command1_Click()
exec xp_cmdshell 'copy c:\program files\我的音乐 d:\我的音乐'
End Sub
上面“EXEC”是什么,如何使用?
CopyFile "c:\test.txt","d:\new.txt",1
End Sub
------------------------------------------
引用“Microsoft Scripting Runtime”