42

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?

2 Answers 2

43

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.

24
  • 1
    Works for the whole user directory too.
    – Chema
    May 24, 2018 at 23:10
  • 6
    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, 2019 at 16:11
  • 2
    @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, 2019 at 22:14
  • 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, 2020 at 11:13
  • 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! Feb 4 at 10:46
11

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

Right click -> Properties -> Location.

Taken from here

6
  • 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, 2018 at 23:10
  • 26
    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, 2020 at 20:46
  • 4
    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 Apr 6, 2021 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. Jul 1, 2021 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, 2021 at 1:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.