Pages

RoboCopy VBS Script


VBS script with source and destination folder input dialog boxes as well as hard coding the RoboCopy command line switches opposed to issuing the commands from the command prompt
 
 
 

Set objShell = CreateObject("Wscript.Shell")

 

objSource = InputBox("Enter Source")

objDestination = InputBox("Enter Destination")

 

objCommand = "RoboCopy.Exe " & Chr(34) & objSource & Chr(34) & " " & Chr(34) & objDestination & Chr(34) & " /e /r:1 /w:2"

objShell.Run(objCommand)

 

MsgBox "Done"

0 comments:

Post a Comment