53

I have 3 Drives, Boot(C:), Data(D:) and Restore(E:) My C: , which has 116 GB is full, and most of it is in my Appdata\Local (50GB) My D: has 377GB Free Space and I wanted to Know if it is safe to move the AppDta folder to it.

I did this with the Appdata\roaming yesterday and it did not work but after a restart it was back to normal and this time I searched for it on google and made a User\username\AppData folder in my D: drive and went to the properties of Local and manually moved it to the new folder like the search told me and after opening the Local\ElevatedDiagnostics Folder which had admin rights it was possible for me and it is copying everything right now

Will this work? and if not, will it be easy to return back to the previous state like with the roaming folder?

DOGE
  • 631
  • I found this tricky so I actually used third-party software Todo PCTrans and this was really helpful https://www.easeus.com/pc-transfer/move-appdata-to-another-drive-windows-11.html – Nooruddin Lakhani Jan 26 '24 at 10:17

2 Answers2

54

Just moving the folder is not enough.

Once you have moved it, you must replace the original with a symbolic link to the new location. This will make windows think the data is still located on your C drive, while it actually is on your D drive.

Do note, this does work with AppData, but not with Program Files nor with the Windows folder, as it will break things like Windows Update.

To create the Directory Junction (Symbolic Link) do the following:

  1. Open a cmd window with administrative privileges.
  2. Navigate to c:\Users\username\appdata
  3. execute the following command: mklink /d local d:\appdata\local
    replace d:\appdata\local with the actual path of where you moved the appdata to.

If you cannot move/delete the original copy, create a 2nd user, make it administrator, login with it, and retry the option. This should ensure that no files are in use.

LPChip
  • 61,264
  • 1
    Works for the whole user directory too. – Chema May 24 '18 at 23:10
  • 1
    @Chema it does, but you have to be very careful to not change any of the folder permissions, otherwise a user won't be able to load their profile anymore. – LPChip May 25 '18 at 07:28
  • A bit late (I always hold on updates for a few weeks, to prevent stuff like this), but Windows 10 October's update nuked many Documents folders using this trick. If it happens to you, I hope you've got a fresh backup! (if not, stop using that PC until you get a copy of Recuva).
    https://blogs.windows.com/windowsexperience/2018/10/09/updated-version-of-windows-10-october-2018-update-released-to-windows-insiders/ «We have fully investigated all reports of data loss, identified and fixed all known issues in the update, and conducted internal validation.» Chea rite!
    – Chema Nov 09 '18 at 20:19
  • @Chema it will only happen if you also use OneDrive. The bug here is that if you use OneDrive, but not updated to the latest version before upgrading, only then will you lose your files. If you don't use OneDrive or you have the latest version, then there's not a problem. That said, Microsoft has pulled the update quite a while ago, so upgrading at this point is not even possible. – LPChip Nov 09 '18 at 20:23
  • Two issues are related to OneDrive, but not the first one listed: «Using KFR the user redirected a known folder to a different drive.» KFR is the "official" way to move Documents. I thought I was using symlinks, but now I suspect I ran into problems symlinking the user directory and probably used KFR instead... I'm no longer sure... never are, with Winbugs Updates! – Chema Nov 09 '18 at 20:44
  • I managed to "redirect" the whole {user} folder to d: which is great. But ran into problem where the Start button doesn't work (blank when I click on it). FRIENDLY reminder to set the SECURITY of the new folder to allow the user to access it!! – jlee88my Jul 21 '19 at 07:41
  • 9
    FYI, a junction is a mount point, not a symlink. The I/O manager implements junctions as hard name graftings. When parsing a path in an open/create context, a junction's security is evaluated, and a relative symlink that traverses it as an ancestor via ".." components handles it as a regular directory. OTOH, in an open/create context, the system does not evaluate the security of a symlink, and a relative symlink will traverse the target of an ancestor symlink rather than the symlink itself. mklink /d creates a symlink. mklink /j creates a junction. – Eryk Sun Aug 29 '19 at 16:11
  • @ErykSun I'm a bit confused. So, in short, should I do mklink /d or mklink /j in this case? – Henrik Dec 30 '19 at 16:21
  • 5
    @Henrik, I'd use a junction, which basically acts like what's called a "bind" mount point in Unix. The practical difference is when they're traversed while reparsing relative symlinks that have ".." components. A junction mount point behaves more like a cross-filesystem hardlink in that case, so its ".." parent directory is always the literal parent from the path as parsed, whereas a symlink resolves to the target in this case, so its ".." parent directory will be different from the parent in the parsed path. So overall a "Local" junction behaves more like a regular directory. – Eryk Sun Dec 30 '19 at 22:14
  • @LPChip it didn't work for me. When I try to move the AppData I got some errors because the files cannot be moved. So basically I'm stop at the first step – Salvatore Di Fazio Apr 26 '20 at 07:02
  • 6
    @SalvatoreDiFazio I know reading is hard, but please refer to the last paragraph to continue: "If you cannot move/delete the original copy, create a 2nd user, make it administrator, login with it, and retry the option. This should ensure that no files are in use." – LPChip Apr 26 '20 at 11:13
  • @LPChip oh I read it but I did too fast... thx and good English humour – Salvatore Di Fazio Apr 26 '20 at 13:03
  • @LPChip I did how u suggeted but some files, like MS Edge, python and others, gave me a error when I tried to move them – Salvatore Di Fazio Apr 26 '20 at 15:16
  • @SalvatoreDiFazio if you are working on appdata, and you create a new user, and make sure you are only logged in with the new user, not the one you are trying to move the data from, it will work. If for some reason your main user is logged in, it will not work. – LPChip Apr 26 '20 at 15:37
  • @LPChip I've done as you wrote. But it seems thats some files remain locked. Also, when I logged in back with the other user, the Start button start to behave odd. I didn't try to do the same in safe mod – Salvatore Di Fazio Apr 26 '20 at 18:33
  • @SalvatoreDiFazio You will have to move the files back. Your startmenu will work again. May I suggest you make a copy instead of moving? Once done, try to rename the app data folder and make the link, then delete the app data folder – LPChip Apr 26 '20 at 21:15
  • 1
    I have tried this on a VM with a new test account and ran into many issues. The Start Menu would not open whether I created a /d or /j link. Tested on version 1909. – Chiramisu Sep 01 '20 at 03:57
  • 1
    I created the tmp user with admin rights, copied the files, then created the mount point redirect. This is working for me so far. – qxotk Nov 15 '21 at 01:33
  • 2
    I second @Chiramisu's experience; My build is Windows 10 Pro 21H1 19043.1466, all I get is "Critical Error ... Your start menu isn't working. We'll try to fix it the next time you sign in." and it's not fixed even after another sign in. The scariest part is that I put my folder back (no links whatsoever) and the error is still there! – Miro Kropacek Feb 04 '22 at 10:46
  • @MiroKropacek I've done it so many times now, if its not working for you, then you have done something incorrectly. – LPChip Feb 04 '22 at 11:05
  • Unfortunately I'm having this same issue. Windows 10 Pro 21H1 19043.1466 , seems same as @MiroKropacek. @LPChip any ideas on how to fix it? I did the steps via the other user (logged out of my current one), created the a link with /j and have been trying to fix the Critical Error on the start menu ever since. Haven't tried restoring the folder to C – Andres C Feb 04 '22 at 20:45
  • Looking at the previous comments, I decided to go by parts. I was able to move C:\Users<name>\AppData\Local\Docker to drive D as per instructions above on Windows 11 as well. Maybe it's worth moving only the bigger folders as needed - not the root path. Sometimes the second SSD is not so fast and you can have perf issues moving all the folders from local data. – Mário Meyrelles Feb 16 '22 at 17:18
  • 1
    I'm also having the same issue while correctly following the commands above. My start menu was broken even after putting the old folder back in place exactly like @MiroKropacek stated I however was able to fix this with this run via Admin Powershell Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} from this link: https://www.freecodecamp.org/news/windows-10-start-menu-not-working-solved/ – phrogg Feb 17 '22 at 22:13
  • So I figured out how to fix it. I just created the link for the folder with the /j option and then run the powershell command from above. – phrogg Feb 17 '22 at 22:51
  • Windows 10 Home 21H2 build 19044.2604: I also got the "Your start menu isn't working" error, but I have been unable to restore it. The start button now seems permanently disabled. I have tried the PowerShell command above, I have tried registry updates, I have tried running several SFC and DISM commands. They complete successfully but nothing changes. It seems my only recourse at this point is to migrate to a new user account or reset my PC entirely. The symlinks appear to work for everything else except the start menu, which is completely inoperable at this point. – Max Cantor Feb 18 '23 at 01:26
14

AppData folder has three folders inside and each can be moved separately.

Right click -> Properties -> Location.

Taken from here

  • The symlink way is easier, but this works if you first copy the folders using another account, so when you do this you don't have to move them (and run into files in use problems). – Chema May 24 '18 at 23:10
  • 30
    I don't know why but I don't have a Location tab under Properties (I'm on Windows 10 version 1903). – Jean Paul Jun 12 '20 at 20:46
  • 6
    I only see the Location tab on Roaming folder. Not in Local or LocalLow. But it is a gain to move the Roaming folder at least – Carlos Rafael Ramirez Apr 06 '21 at 10:43
  • 1
    I think using Location is safer as symlink approach is an unsupported hack which can break upgrades. However I haven't tested this. – Michael Grazebrook Jul 01 '21 at 18:41
  • On my 32-bit win10 I was able to see Location on the properties for the folders, but I was not able to find any way where I could change the value for Location. Where is that option? – qxotk Nov 15 '21 at 01:32
  • The location change seems to be possible only for special folders like Downloads, Images, Music and Documents. I couldn't find for other folders. The same holds for Windows 11. – Mário Meyrelles Feb 16 '22 at 17:01
  • 1
    @MichaelGrazebrook "I think using Location is safer as symlink approach is an unsupported hack which can break upgrades." - That only applies to Program Files and no one is suggesting that as LPChip pointed out. "Location" - well that only works until the first app that comes along that is hard-coded to write to C:\Users...\AppData. If you use directory junctions however this is never a problem as everything is redirected. "...hack..." - I don't think POSIX would like that adjective. – Deleted Jul 30 '22 at 05:38