Moving a user’s files/directory in Windows 7

There was a time during the days of Windows XP, when you could simply right click on your My Documents folder, go to properties and relocate your entire documents folder. When Vista came, it brought with it a number of folders that were now associated with the user. This included Downloads, Searches, Music etc etc. Even though it initially seemed complicated, this uniform structure for each user has eased the backup process. Now, the process I describe is not actually a backup but still the first step that I take to prevent loss of data in the event the drive on which the OS resides, crashes.

I know there will always be another way or simpler method to move your files from one drive to the other but what I describe here is tried and tested – on Vista and Windows 7. The basic logic is to simply create a symbolic link for each user folder inside the “Users” directory in the root of your drive. You may also relocate the entire “Users” folder to another drive or like me, simply relocate the user you want to.

Say, you are user “Peter”. Correspondingly, your folder is C:\Users\Peter (C: being the drive where Windows is installed). Now, you want to move your user data to another drive, say D:.

  1. Firstly, open Control Panel and navigate to User Accounts. You may also execute “control userpasswords” in the Run dialog.
  2. Create a new account. Name it “Dummy” and designate it as an Administrator.
  3. Go to Start and Log Off from the account “Peter”.
  4. Click on the username “Dummy” and login to the newly created administrator account.
  5. In Windows Explorer, navigate to C:\Users. Select the user directory you wish to copy, in our case it is “Peter”. Copy C:\Users\Peter to say D:\Users\Peter. Confirm all prompts that may follow this operation.
  6. Once you have copied the entire folder, navigate back to C:\Users and rename the folder “Peter” to say, “Peter_OLD”. I encountered trouble during this step in Windows 7 where it kept on asking me to try again. A simple workaround is to login to Windows in Safe Mode by pressing F8 again-and-again when the OS starts to boot and selecting Safe Mode from the menu that opens. When Windows boots in Safe Mode, simple open C:\Users and renam the folder “Peter” to “Peter_OLD”. In Vista, you may just have to confirm a series of UAC prompts.
  7. This next step involves using the command line. Fire up the Run dialog box and type “cmd” and press ENTER. When the command prompt opens, navigate to the directory C:\Users. Now, type the following :

    mklink /d Peter D:\Users\Peter

     

  8. Press ENTER. A shortcut named Peter is now created in the directory C:\Users. This is a symbolic link which redirects all requests to the folder D:\Users\Peter.
  9. Restart your PC and login to the account “Peter”. It should display everything normally except for the hidden fact that every file associated with the current account is stored on the other drive.
  10. If everything is normal, then you may simply delete the folder “Peter_OLD” from C:\Users. Open up the User Accounts in Control Panel and delete the account “Dummy” and all files associated with it. If there is an error, just login to the Dummy account, delete the symbolic link “Peter” and rename “Peter_OLD” to “Peter”. If you encounter errors, login to safe mode and try.

The above method works perfectly. The only drawback that I have seen is that Internet Explorer becomes extremely slow and is unstable in both Vista and 7.

The original guide for Vista is here.

Comments are disabled for this post