RoboCopy from within VBScript

Dim objShell, objSource, objDestination, objCommand

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)

Advertisements