תודה לכולם צ'אט g.p.t נתן לי פקודות מתאימות
להעתקת קבצים
Sub CopyFiles()
Dim sourceFolder As String
Dim destinationFolder As String
Dim shell As Object
sourceFolder = "C:\respbkup\A"
destinationFolder = "C:\Users\Public\Documents"
Set shell = CreateObject("WScript.Shell")
shell.Run "cmd.exe /c xcopy """ & sourceFolder & """ """ & destinationFolder & """ /E /I /Y"
Set shell = Nothing
End Sub
להעתקת תקיות
Sub CopyFiles1()
Dim sourceFolder As String
Dim destinationFolder As String
Dim fso As Object
sourceFolder = "C:\respbkup\A"
destinationFolder = "C:\Users\Public\Documents\"
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFolder sourceFolder, destinationFolder
Set fso = Nothing
End Sub
תודה לכולם