RoboCopy VBS Shell Script


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"



MsgBox "Done"


Published Sunday, May 20, 2007 7:24 AM by dhite
Filed under:


# McAfee Virus Scan Prevents Remote Copy Of AutoRun Inf Files

I recently had a reader ask for a VBS script to copy CD-ROM installation media source files from a physical

Sunday, June 01, 2008 8:35 AM by Don Hite