16

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?

20

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.

| improve this answer | |
  • Works for the whole user directory too. – Chema May 24 '18 at 23:10
  • @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 7:28
  • 2
    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
  • 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 '19 at 22:14
  • 2
    @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 at 11:13
2

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

Right click -> Properties -> Location.

Taken from here

| improve this answer | |
  • 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
  • 2
    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 at 20:46

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