Copying User Profiles

by Mitch Tulloch [Published on 14 April 2009 / Last Updated on 3 Dec. 2008]

How to copy user profile folders in Vista and later.

In pre-Vista versions of Windows, you could use the xcopy command to copy all user profile folders and their contents to another location, for example when you want to back up or clone the contents of a user's profile. This won't work in Vista or later however because xcopy doesn't handle directory junctions points properly. These directory junction points automatically redirects attempts to access legacy profile paths to their new profile locations. For instance, if you type dir /AL at a command prompt whose current directory is the root of C: drive, you'll see that there is a directory junction point named Documents and Settings present that redirects to the new location C:\Users where user profiles are now stored in Vista and later.

So what can you do if you need to copy user profile folders and their contents in Vista? Use the robocopy command instead, where you can include the /XJD switch that causes directory junction points to be ignored during the copy process.

The Author — Mitch Tulloch

Mitch Tulloch is a widely recognized expert on Windows administration, networking, and security. He has been repeatedly awarded Most Valuable Professional (MVP) status by Microsoft for his outstanding contributions in supporting users who deploy and use Microsoft platforms, products and solutions. Mitch has published over two hundred articles on different IT websites and magazines, and he has written or contributed to almost two dozen books and is lead author for the Windows 7 Resource Kit from Microsoft Press. For more information, see www.mtit.com .

Latest Contributions

Featured Links