Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

RoboCopy

$
0
0

Hi guys,

Below is my robocopy script. Now basically as part of our OS upgrades i want to run robocopy against users machines to copy the documents off (this is a bit of a fail safe in case for any reason USMT should mess up). Now one thing im struggling with is getting the hostname of machines in. Basically at the moment its copying its data to the backup drive and calling it "Users", but i need to change this to the hostname so i know that if PC x has a problem i can go to this location and get the data easily for PC x. Im doing this on thousands of machines so really need to automate the name...... Can anyone help?

Echo off
cls
echo Backup (Replication) in Progress...
c:\robocopy\robocopy c:\users\ \\cukit01\migration\backup /COPYALL /E /B /MIR /R:1 /W:1 /LOG:Backup.txt
copy c:\robocopy\Backup.txt \\cukit01\migration\backup /y


Viewing all articles
Browse latest Browse all 15028

Trending Articles