Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Guides abound on the Internet about how to use Robocopy to save the files in a User's profile directory in Windows 7 (Vista, 8, etc.), using the command:

robocopy [USER] [BACKUP] /MIR /XJ

These guides always make sure to mention to use the /XJ flag to ensure to ignore the special Junctions (/Application Data, /Start Menu, etc.) that Microsoft created in Vista for backward compatibility with XP.

But, when the time comes to restore the backup I made, how do I do that?

If I login with the user once to create a folder in the Users directory, log out, and then try to use Robocopy to copy to that directory (robocopy [BACKUP] [USER] /MIR /XJ), Robocopy seems to ignore the /XJ switch and parses the Junctions, and enters a circular loop with the /Local Settings/Application Data/Application Data/... path.

If I do a login/logoff with the user, and then delete the user's folder, and use Robocopy to recreate it (robocopy [BACKUP] [USER] /MIR), Windows will use that user's folder for the user, but not create the backward-compatibility Junctions.

If I try to make the copy before the user's first login, it will create the folder, but Windows won't use it for the user's profile folder, but will instead create a folder with a different name for the user's profile folder.

Am I missing a flag, or can I issue a command to Windows to force it to recreate its special Junctions?

share|improve this question
Why don't you just use Windows Backup to backup your user profile? This is a simple question I don't know how to solve your problem outside of using different software. – Ramhound Sep 14 '12 at 12:06

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.