Folder can't be moved here when trying to relocate Appdata\user\Local

Solution 1:

After hours and days of research, I finally happened across a helpful YouTube video that showed how it's done.

It appears that in all likelihood, just changing the path an d letting Windows copy the files over for you is going to report an error. You will end up with files that are in use.

And this causes Windows to not complete the operation, and leave the .../AppData/Local in it's original spot. It won't change the path because of the failure.

But the trick is go right back to that dialog after the original attempt with the file copy, change path to where you want it to be (in my case from C:... to D:...), and when it asks you if you want to move the files say "No". The path is now changed.

You need to reboot the system next and you should be all set.

You'll need to clean up the original location which is no longer being used. Confirm this by looking at the properties on the folder and make sure there is no "Location" tab on the original AppData/Local folder.

After this change, I also found that windows and some apps had forgotten about a few preference related things, and I had to fix things, like my Spotify shortcut, which had hard-coded paths to c:\users\mark\appdata...

Best of luck. I hope this helps some.

Solution 2:

Complementing MarkS answer, even after you manage to move everything by checking "No" when it asks if you want to move the files and you move it manually, some programs will still try to execute using the old path. This happens with programs hard-coded in the system's PATH variables, etc.

A workaround for this was to create a hard link between the old path and the new path:

mklink /J C:\Users\Lucas\AppData\Local D:\AppData\Local
mklink /J C:\Users\Lucas\AppData\LocalLow D:\AppData\LocalLow
mklink /J C:\Users\Lucas\AppData\Roaming D:\AppData\Roaming

The problem is that, to create the hard-links, there can't exist a file with that name, so you have to delete it first, and in my case some programs were locking it from deletion.

I managed unlock AppData\Local to create the hard-links by using LockHunter, a freeware utility that shows the processes locking a file/folder.

Install Lockhunter. Right click on AppData\Local -> "What is Locking this Folder?", click "Other" -> Unlock and Rename.

When you do it the first time, only explorer.exe should still be locking the folder. Then, keep LockHunter open, open the task manager (CTRL + SHIFT + ESC), kill explorer.exe and repeat the previous step (Unlock and Rename again).

Now it should work. Don't open explorer.exe yet. Instead, create the hard-link. After the hard-link is created, open explorer.exe by pressing Windows + R and typing explorer.

Now you should have all your AppData moved and without any PATH hassle.