[Solved] Robocopy With User Prompts

Score
0
Vote Up
February 13, 2012 at 11:56:17 Pacific
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


Jump to Best Answer ↓   Report •


#1
Vote Down
Score
0
Vote Up
February 13, 2012 at 14:02:56 Pacific

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


Reply ↓  Report •

#2
Vote Down
Score
0
Vote Up
February 14, 2012 at 00:00:11 Pacific

Greetings IVO

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

Kind Regards
Tor Fey


Reply ↓  Report •

Reply to Message Icon Start New Discussion
Related Posts

« Delete last line in txt f... windows 3.x memory »