How to move user data folder to non-system partition in windows 7/vista

May 16th, 2009

As you know,windows 7/vista put all system data and user data on the same partition,normally it’s drive C.Under this condition we must backup our user data every time we re-install our windows 7/vista.From windows vista ,Microsoft supply us a tool mklink which can create a symbolic link under windows 7 or vista just as the command ln under unix/linux.Below is an example about how to put user data on non-system using mklink in windows 7.
1.Enable administrator account and set a password for it.You can refer How to enable or disable administrator account in windows 7

2.Logoff and login with administrator account

3.Relocate your user data to other non-system partion,for example from C:\users\J  to D:\users\J

4.Use mklink to create a symbolic link from C:\users\J to D:\users\J

mklink /D C:\Users\J  D:\users\J

5.Re-login use your own account,you will find nothing changed,but in fact your physical user data is on drive D.

6.Done.The next time you re-install your OS ,just use the same user name, remove  C:\users\J then run the command of step 3 again then your user data is back.

mlink

17 Responses to “How to move user data folder to non-system partition in windows 7/vista”

  1. CC says:

    Great jobs,it works here,many thanks

  2. [...] source:How to move user data folder to non-system partition in windows 7/vista [...]

  3. mejobloggs says:

    I just get “Cannot create a file when that file already exists” :(

  4. mejobloggs says:

    Ok I got the mklink to work now, except when I login, the profile says it can’t access the folder, so just runs a temp profile.

  5. admin says:

    Are you sure the link works?Go to C:\Users\ ,double click the link “Your username”,can you go to the correct path?

  6. zain says:

    getting this messege “Cannot create a file when that file already exists”

  7. [...] Hope it’s useful for you: How to move user data folder to non-system partition in windows 7/vista [...]

  8. omega says:

    Initially, I had the same problem mejobloggs did. A temporary profile was created when I logged into my main user account. However, I realized that it was a simple path mistake, i.e. I relocated my “Username” folder to drive D:, but I typed “D:\User\Username” instead of “D:\Username”. I went back to the Administrator account, fixed it, and everything is working order.

    Thanks for this awesome tutorial!

  9. beng says:

    You can simply righh-click drag and move the folders from your user folder to the new folder on the other partition, see:
    http://blogs.zdnet.com/Bott/?p=215

  10. beng says:

    For moving thepublic folder, see:
    http://integrityitsolutions.blogspot.com/2008/09/how-to-move-public-folder-to-different.html

    Also on vista it is good to set the permissions on the moved to location folder to the same as on the folder in C:\users

  11. beng says:

    Note: on vista home premium 64 i also get the message
    “Cannot create a file when that file already exists”
    when i try to create the symbolic link, so the method on this page does not work for me.

    Just dragging over the folders (see the zdnet link above) works though. It won’t move the NTUSER.dat and other system registry files, but it works for the documents, favorites, etc folders, which is the important data.

  12. Sebu says:

    I’m curious, but does this work so that if I link mklink /D C:\Users\ D:\users\, every profile created afterwards will automatically create the profile directories on D?

    Basically, I guess what I’m trying to say, is can this method replace this one?
    http://www.maximumpc.com/article/howtos/howto_optimize_your_windows_profile_and_media_storage_ssd

  13. Bob says:

    When I try to move the Users folder to another partition, I get the error message: “Error 0×80070057. The parameter is incorrect”. Does anyone know how to fix this?
    thanks

  14. robaal says:

    To avoid the “Cannot create a file when that file already exists”, make sure to uncheck “Hide protected operating system files” and enable “Show hidden files(…)” in Windows Explorer folder options before moving the contents of the user folder.

  15. Marc says:

    It’s a shame that Microsoft makes us tanker around instead of providing a neat standardized solution to the very common wish to separate OS and user data…

  16. Colin says:

    It works better to create a Junction rather than a symbolic link, e.g.:
    mklink /J C:\Users\MyLogin D:\users\MyLogin

    Also, make _SURE_ you copy any hidden and system files over as well!

  17. Peter says:

    Are you sure this works after reinstalling Windows? I’ve tried it, and after linking to the old account, I get either logged out when trying to log in, or I just get logged in with a temporary account.

Leave a Reply