Solved Robocopy With User Prompts

February 13, 2012 at 11:56:17
Specs: Windows 7, AMD Phenom 9600
Evening All

I am trying to create a robocopy script that prompts for the parameters to use, for example instead of hard coding the following: -

@Echo off
robocopy "C:\Users" "T:\Backup" /MIR /XA:SH /XD AppData /XJD /R:5 /W:8 /V /ETA /LOG:Backup.log /TEE
Pause

I would like to make a script that asks for the source & destination but still adds the above switches. Is this possible?

Kind Regards
Tor Fey


See More: Robocopy With User Prompts

Report •

#1
February 13, 2012 at 14:02:56
✔ Best Answer
@Echo off

set /P source=Enter Source^>
set /P target=Enter Destination^>

robocopy "%source%" "%target%" /MIR /XA:SH /XD AppData /XJD /R:5 /W:8 /V /ETA /LOG:Backup.log /TEE
Pause


Report •

#2
February 14, 2012 at 00:00:11
Greetings IVO

Many thanks for your help, you are a life saver.

Kind Regards
Tor Fey


Report •
Related Solutions


Ask Question