This by request VBS script will provide you with an example of how to use RoboCopy in a 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.
Note: This script assumes that RoboCopy is located in the same directory folder as the VBS script.
VBS Script:
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"
I recently had a reader ask for a VBS script to copy CD-ROM installation media source files from a physical