Robocopy oddities

Just a quick word of warning; be careful when copying a Windows Vista/ 7 system drive wholesale with robocopy! I’ve had a strange issue this week when trying to backup my work’s laptop drive in another PC (faulty LCD panel so I can’t see anything to back it up on the laptop). The issue seems to revolve around the “Users” folder and the pseudo-“Documents and Settings” junction point; basically, it started copying data off the host PC and more bizarrely, created huge numbers of nested “Application Data” folders underneath certain user profiles. After knocking up a quick-‘n’-dirty batch file to sort out the “Application Data” folder problem:

attrib -r -h -s * /S /D
IF EXIST “Application Data” MOVE “Application Data” a
cd a

I could eventually delete all user profiles (the paths were too long before) and then re-run robocopy with the following switches:

/XF hiberfil.sys pagefile.sys


/XD “F:\Documents and Settings” “F:\Users” “F:\ProgramData” “F:\$Recycle.bin”
(quote marks are very important, especially where there are spaces in the names).

After re-running like this, I had most of the drive and then simply backed up the user profiles I was interested in individually.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s