39

I use a 60GB SSD for the C: partition where Windows and other essential programs are installed, using a larger mechanical HDD for D:, and I repeatedly find myself short of disk space on C:, with the main culprits being folders within %LocalAppData% [Picasa & Outlook files].

How can I move these folders to D:, recovering space on C:?

JW0914
  • 7,865
Nikhil
  • 2,457

10 Answers10

51
  1. Open the %LocalAppData% Properties dialog
  2. Location tab → Enter desired new location
  3. Move
JW0914
  • 7,865
kreemoweet
  • 4,663
  • 3
    What happens to existing applications that rely on the %AppData% files? Do the applications need to be stopped? Or can they run and the move is seamlessly performed? – Sun Nov 12 '14 at 19:21
  • Same applies to \LocalLow and \Roaming. I wasn't able to copy the \Local directory, but \Roaming worked and I freed over 18GB. Thanks. – Mateng Apr 23 '15 at 06:06
  • I directed the Move of AppData/Roaming to my NAS drive and now I'm getting permissions problems. Is this because the NAS drive is a linux volume and Roaming files work best on an NTFS volume? How do I fix the permissions in this new location? I've had to log in to the NAS and remove log files that programs could no longer write to and Windows could neither delete nor modify the permissions on. – chuckkahn Aug 08 '15 at 18:51
  • UPDATE: enabling ACL on the NAS seemed to fix the permission errors. – chuckkahn Aug 09 '15 at 23:10
  • 4
    Getting permission denied, the heck. I am the only user of this PC too. – hak8or Sep 07 '15 at 02:35
  • @hak8or maybe it depends on windows version? I'm getting access denied too on Win10. – Andrew Savinykh Oct 12 '15 at 00:15
  • 4
    I too am getting access denied on Windows 10. – GiddyUpHorsey Nov 01 '15 at 00:36
  • 6
    Doesn't work in Windows 10 it seems. The files are being copied, but in the end the operation will be automatically cancelled for some reason – xji Dec 04 '15 at 23:01
  • You either need to just open the folders you don't have access to, or delete them in safemode. (They'll probably be regenerated anyway) When opening the folders, windows'll let you take ownership. I didn't manage to do that the "proper" way (propagate from root), but just popping them makes it work. – Lars-Erik Mar 15 '17 at 22:40
  • 1
    This is how you're supposed to do it, but it doesn't work. Even if you own and have full control of all files and folders under AppData, some files in Appdata/Local will be locked by SYSTEM, and can't be moved when you're logged in under that account. But there's no way to move it when you're logged into a different account--the Local tab appears only for Users files for the account you're logged into. Unless there's a command-line way of doing it. – Phil Goetz Dec 19 '18 at 20:40
14

How about using mklink to create a symbolic link:

  1. MkLink /d C:\Users\Nikhil\AppData\Local D:\AppData\Local
    
    • I haven't tried this, so maybe give it a test drive in a VM first; you may also have to create separate symbolic links for each subfolder
  2. Move all the files/folders from the %LocalAppData% to D:\AppData\Local
  3. Delete %UserProfile\AppData\Local
JW0914
  • 7,865
j_bombay
  • 670
  • 1
    +1: This is how Microsoft redirects programs that have c:\Documents and Settings hardcoded in. – surfasb Sep 21 '12 at 22:56
  • Does this work? Can you mklink when Local already exists? I'm pretty sure you can't. You could try to rename the existing one first, but I think it'd be in use, and any programs attempting to access Local in the meantime would then fail. – Mooing Duck Apr 12 '14 at 19:15
  • Better to link a directory with the /J option – steampowered Nov 20 '16 at 07:07
  • 3
    This didn't work for me because Local is in use and you can't make a link when it already exists. Starting Windows in safe mode with command prompt allowed me to rename the existing folder and create the link though – Matt Kemp Sep 10 '17 at 00:26
  • 1
    @steampowered why is J better? what's the difference or scenarios where it shines? – ahnbizcad Oct 14 '17 at 04:25
  • Shouldn't this be edited to preserve the user in the destination? mklink /d C:\Users\Nikhil\AppData\Local D:\Nikhil\AppData\Local Particularly in a managed SSD/HDD environment, it is likely for more than one APPDATA to have to be placed there in the future. – undrline - Reinstate Monica Jun 20 '19 at 16:40
7

This isn't an answer to your question but probably a solution to your problem, as I'm thinking:

  • Generally, C:\Hiberfil.sys is huge and since you don't need hibernation with an SSD as it lowers boot time, disable hibernation via an Admin terminal:
    PowerCfg –h Off
    

On my system, this freed 12GB since hiberfil.sys is no longer needed, and, for me, this would be a much better solution than moving the %LocalAppData% since moving it to a mechanical HDD would slow down drive-access for every affected program, thus defeating the purpose of the SSD.

JW0914
  • 7,865
  • 1
    +1. This probably solves the stated problem. The AppData idea is a typical case of an XY probem. Don't blindly assume that the OP is using the right tool to solve his real problem. – MSalters Aug 06 '14 at 12:13
  • 2
    On the other hand, maybe you need hibernation because when you close your laptop and go someplace else, and you're in the middle of important work, you don't want to have to get all the same apps loaded up and figure out exactly where you left off from a completely cold start. ;-) – Craig Tullis Jul 04 '16 at 06:24
2

Using the registry method within Shell Folder/User Shell Folder, folder redirection for all subsequent data will be saved at the new location by default:

JW0914
  • 7,865
2

Microsoft does not recommend moving %AppData% off the system partition.

  • Use TreeSize Free to see if there other ways to remove files, as sometimes C:\hiberfile.sys and C:\pagefile.sys are candidates
  • %LocalAppData%\Temp could be redirected to a mechanical HDD

You should really consider getting a bigger SSD, as you want to run with at least 30% free so the SSD has vacant blocks to write to; running at 99% full on an SSD increases wear level, with the performance you come to expect from SSD being greatly diminished.

JW0914
  • 7,865
Sun
  • 6,318
  • 1
    The MS link doesn't say anything about APPDATA not being moved, only about SYSTEMDRIVE and ProgramData. Do you have another reference for this not being recommended, or some specified pitfalls? – undrline - Reinstate Monica Jun 20 '19 at 16:03
  • @undrline I wrote this answer in Nov 2014. Page was updated June 2018. I don't recall what was written exactly on the Microsoft URL in Nov 2014. After looking at the solutions, I'd go for j_bombay's solution with the symlink (mklink) https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/ – Sun Jun 21 '19 at 18:27
1

Login using Safe mode:

  1. Press F8 at boot and select Safe Mode from the menu
  2. Navigate to %AppData% → Right-click LocalLow and/or RoamingProperties
    • You can't safely move %LocalAppData% since it's also being used in Safe Mode, but the Roaming and LocalLow folders hold great potential for space recovery.
  3. Tab: Location → Move
  • %AppData% is the variable for the %UserProfile%\AppData\Roaming directory (there is no variable for %UserProfile%\AppData or %UserProfile%\AppData\LocalLow), with %LocalAppData% being the variable for %UserProfile%\AppData\Local – JW0914 Oct 10 '20 at 12:41
  • This doesn't work for me in safe mode. The location tab only appears with a full boot. – xaviersjs Dec 22 '22 at 04:52
1

It's possible to move Outlook .pst files to a different location, changing your profile to point to the new location:

JW0914
  • 7,865
  • 1
    A lot of programs use the Local folder; if you were to look for such articles for every program it's gonna be a very long day, and for most of the programs you wouldn't even be able to do that. – Tamara Wijsman Sep 21 '12 at 21:34
  • Right click the Local folder, click Properties. Use the Location tab to put it where you want. – David Marshall Sep 21 '12 at 21:48
0

I just recently did something about this to move 100gb of data.

First of all, I did not try to move the whole appdata. Instead, I search in appdata to find where It consumes the most space. Turns out, the adobe folder was getting about 70 gb.

So I did a joint folder with a mklink.

First, I created the folder D:\mklinks\appdata\adobe. The name here is purely organizational.

Second, I copied the contents of C:\users\user\appdata\roaming\adobe to the folder in D.

Third, I ran command prompt in administrator mode. There I entered the command

MkLink /J "C:\Users\User\AppData\roaming\adobe\linkadobe" "D:\mklinks\AppData\adobe"

The /J will create a joint connection named linkadobe, which will look like a shortcut. But all the adobe programs kept running smoothly (the only complain is the icon on the taskbar changed to a blank icon). The name "linkadobe" is just my own chosen pattern. The citations are necessary in case any folder is not single word named.

I repeated the process for a few more big folder and did not see any problems so far. I just checked the adobe folder as I was writting these. It seems that adobe recreated all the folders there were on the original directory, but the folder is 19mb so far.

Marcus
  • 1
0

Over a period of time, I mysteriously lost 100gb HD space within Win 7 Home Premium, with Space Monger reporting it was from subfolders within %UserProfile%\AppData, which I think are hidden files.

  • Research online suggested that since these are temporary user files, I could delete them, which I did via Space Monger, recovering 100GB with no noticeable ill effects.
JW0914
  • 7,865
Bazza
  • 1
  • If you want to leave folders intact in %appdata% folder, you can browse to the directory in windows and type . the search box. Once you see the list, sort by type and ONLY select files. – anonymous coward Mar 29 '18 at 21:13
-1

While it's not recommended to move the entire %AppData% folder, if you have folders that are taking up a lot of space (Pictures, Documents, etc.), these can be easily moved to another partition:

  1. File Explorer → Right-click on %UserProfile%\PicturesProperties
    Pictures Properties Image Example
  2. Tab: Location → Change directory to the desired location (e.g. D:\Pictures) → OK
    • If you have OneDrive set up, you may run into an issue here; in this case, you need to make a change to the Registry:
      1. Open OneDrive → Settings → Backup
      2. Deselect the desired folder (e.g. Pictures) → Save
      3. WinKey+Rregedit → OK
      4. Navigate to:
        HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
        
        Registry Entry Image Example
      5. Change the value of My Pictures to the desired folder (e.g. D:\Pictures). You can also change all of the %UserProfile% data folders (Documents, Downloads, etc.)
      6. You should be able to move the directories you specified in the Registry via the directory's PropertiesLocation tab

If you want to continue backing up these folders in OneDrive, go back into your OneDrive settings and select the new location to sync.

JW0914
  • 7,865