Answer the question
In order to leave comments, you need to log in
VBA how to run command line with parameters?
I use the command robocopy
in the Windows command line with the following parameters:
robocopy "D:\My files" "E:\My backup" /e /z /s /xd "temp files"
Private Sub Command1_Click()
Shell "cmd /c robocopy " & sSource & " /e /z /s " & sPath & " D:\Files E:\Backup " & sFile
End Sub
Answer the question
In order to leave comments, you need to log in
Shell "cmd /c robocopy " & Chr(34) & sSource & Chr(34) & " " & Chr(34) & sPath & Chr(34) & " /e /z /s /xd " & Chr(34) & sFile & Chr(34)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question