First though, a warning: this is not for the faint of heart or for the technically challenged. This isn’t a walkthrough – if you don’t have a very good understanding of what directory junctions are and what your user profile is made up of (and how Windows itself uses it), then I wouldn’t recommend proceeding any further. If you try this without knowing what you’re getting into, you could seriously mess up your computer.
With that out of the way, there are 3 basic ways of moving your profile (or parts of it) to a different drive.
The first (and easiest) way is to just create new folders for your Documents, Pictures, Videos, etc. on another drive and use the built-in “Libraries” feature of Windows (present since Windows 7) to use these folders instead of the default ones.
The upside to this is that it’s extraordinarily easy – just right-click a library and choose Properties and you can add folders to the library (and remove the default ones, if desired). If you had anything in the default folders, just move (cut & paste) it to the new folder you created. And since the bulk of most people’s user profiles (in terms of disk space usage) is contained in these sets of folders, this allows you to relocate the bulk of your user profile to another drive without much hassle – indeed, without even needing to reboot!
The downside to this is that this only moves some of your user profile. All of your user settings, AppData folders, etc., remain in the default location on the boot drive. Additionally, some programs might ignore (or not recognize) the Libraries settings.
Generally, this is the method I prefer and recommend for most people – it’s actually what I use myself, since things like my Photos and Videos folders are huge and don’t fit on my boot drive. I leave the rest of my user profile alone though, since my boot drive is an SSD and having my profile there helps speed things up for me (and I have enough disk space for this).
If you’re not comfortable with the other two methods I mention here, this is what I’d recommend you use instead.
Unattended Setup Answer File
The second way is to use the unattended setup feature of Windows to instruct Windows Setup to put the Users folder on a different volume.
The upside to this is that it’s generally supported (with some exceptions) and since it is set during the actual installation of Windows there’s nothing you have to change. Further, this relocates the entire Users folder – so all user accounts on your computer will be in the location you specify, including any future user accounts you create. You can also use this to relocate other folders (such as the Program Files folder) as well.
The downside to this is of course that you have to do this before you install Windows… if you’ve already got Windows installed you’re out of luck. Not to mention that creating the unattended answers file is more than a bit complicated, and relocating certain folders (mainly the Users and ProgramData folders) may prevent you from upgrading Windows later on.
The third (and probably hardest) way is to use NTFS junction points (what UNIX/Linux people might know as symbolic links, and what I just call “junctions” or “directory junctions”) to relocate all or part of your user profile to a different folder. This is very tricky for a number of reasons, but if done correctly gives you a seamless (and largely invisible) solution.
The upside to this is that you can choose exactly what you want to move – you can move your whole user profile or just certain parts of it. Also, since it uses junctions, you can still access your files using the old path – so if you move your user profile to (for example) a drive called E:, you can still access it by using the old path (e.g., C:\Users\Keith).
The downside is that you have to be very careful about preserving things like file permissions and any existing directory junctions – Windows contains a lot of junctions already to help with backwards compatibility, and if you move certain folders without checking for things like this, you could end up borking your entire Windows installation (or just breaking compatibility with some programs).
Here’s a list of all the directory junctions present on a default install of Windows 10 – if you move any folders that have junctions associated with them, you may lose some compatibility or have problems later on. You can, of course, re-create these junctions if needed – to get a list of all these junctions on your computer, just use the command:
dir /S /A:L
You may want to pipe the output of this program to a text file to save for later.
Finally, depending on how much of your user profile you end up moving, you may run into trouble upgrading to a newer version of Windows later on.
Nevertheless, this is how you can go about doing it.
First, MAKE A BACKUP. I can’t stress this enough – MAKE SURE YOUR FILES ARE BACKED UP BEFORE YOU BEGIN. If you can, I’d recommend making a complete system image if possible so you can restore your entire boot drive to its previous state in case everything goes wrong.
Secondly, make sure you have a 2nd user account with Admin rights to the machine. Because you’re moving your user profile, you can’t be logged in while you move it – so you need a second account to do this. If you don’t already have a 2nd account, you’ll need to create one (you can delete it after you’re done). Some people prefer to use the recovery console command prompt to do this instead; I’ve not tried this but it should work just as well.
Before you log in with this 2nd account, make sure you have a destination folder created to move your user profile to (or whatever other folder you want to redirect). As an example, let’s say I wanted to move my entire User Profile from the default location of C:\Users\Keith to my drive E: – I’d create a folder called E:\Keith to hold it. You can call it whatever you like, of course – and you can use the root of the drive if you want, but I find that having a folder makes things a bit easier. It’s important to create this folder with your user account so your user account has full access to it.
Now log in under this 2nd account. You’ll also want to make sure as few programs and services are running as possible before you begin, just in case something has locked one of the files in your user profile (which would prevent you from moving it). Shut down any non-essential programs you might have running (e.g., things like Dropbox, printer software, etc.), unplug any non-essential devices, and disable any automatic backups that might be running.
Now comes the big part – moving your files. In this example I’m using the XCOPY command, but you could use something like RoboCopy instead, so long as you use equivalent options. You’ll need to do this from an elevated command prompt, of course.
The command I’d use in this example to copy my profile from C:\Users\Keith to E:\Keith is:
xcopy C:\Users\Keith\*.* E:\Keith /E /C /H /K /O
Let me explain these options:
/E: This tells XCOPY to copy everything – all directories, including empty ones.
/C: This tells XCOPY to continue copying, even if there’s an error. Since this is such a big copy and might take a long time, I’d rather have it continue copying as much as it can the first time around – if there are any errors I can deal with them later. Depending on your preferences, you may want to omit this option so the copy stops if there is a problem.
/H: This makes sure hidden and system files are copied as well – very important.
/K: This makes sure all file attributes (such as hidden and archive) are preserved.
/O: This is the most important one – this causes XCOPY to preserve permissions on files & directories.
A note on permissions: when you copy your user profile, remember that all your user profile files and folders will inherit permissions from the parent folder – in my example, this is E:\Keith. This may cause problems if any of these inherited permissions conflict with the existing permissions. This is why I generally use a brand-new folder on a non-system drive, created by my user account – this ensures that my user account has full access to this folder. You might even want to check the permissions of the folder you copied from and set the permissions on the new folder to explicitly match the old one. In my example, I might copy the permissions from the old C:\Users\Keith folder and make sure the new E:\Keith folder has the exact same permissions set (including anything that C:\Users\Keith might have inherited).
Once all your files are copied, it’s time to do the scary part – remove them from their original location. (If you used something like RoboCopy to actually move the files rather than just copy them, then you don’t need to do this step.) This is because you can’t create a junction if a folder exists with the same name.
You could delete your original user profile folder, but I think it’s better to rename it instead – this way it’s a bit easier to recover in case something goes wrong. Also, this way you can refer back to your original profile for any security/permission settings that you might need. You can delete it later, once you’ve confirmed everything is working.
So, in my example here I’d rename my user profile folder with the command:
ren Keith Keith.old
Making sure that I was in the C:\Users directory first, of course.
Then, I’d create the junction:
mklink /J C:\Users\Keith E:\Keith
This creates a directory junction from C:\Users\Keith to E:\Keith. In this example, if I browse into C:\Users\Keith, I’ll see all my files – even though what I’m actually looking at is pysically located at E:\Keith.
Finally, you can log out of the account you used to do all this work and log back in to your original user account. If you did everything right, it should load without any problems.
Once you’re absolutely sure everything is working as it should be, you can delete your old user profile. Be aware that all the old junctions & compatibility redirects that I mentioned before still point to this old user profile folder – so you may need to re-create them after you delete your old user profile. Just use the MKLINK command to create them as needed.
For this article, I followed all the steps I mentioned above on a new install of both Windows 7 and Windows 10, as well as an upgrade from Windows 7 to Windows 10 (with the user profile moved prior to the upgrade), and it worked perfectly in all cases. If you try this with a computer that’s been in use for a long time, there is a higher chance that you’ll run into some sort of problem – you never know what programs may have weird dependencies or might have installed things in the wrong spot. Nevertheless, if you know what you’re doing, make appropriate backups, and use caution (and common sense), you should be able to use these same techniques to move your user profile as well.