What is a safe way to move AppData\Local to a different drive?

31

23

I have a 60GB SSD as my C: where I have my Windows and other essential program installations. I also have a huge non-SSD D:.

I repeatedly find myself short of disk space on C:. The main culprits are the folders under AppData\Local (in my case, Picasa & Outlook files). How can I move these folders to D: and recover my C: space?

Nikhil

Posted 2012-09-21T20:22:42.987

Reputation: 2 347

Answers

43

Open the Properties dialog for ...\Local, click Location tab, enter desired new location, click Move button.

kreemoweet

Posted 2012-09-21T20:22:42.987

Reputation: 3 884

3What 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 – 2014-11-12T19:21:48.330

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 – 2015-04-23T06:06:53.360

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 – 2015-08-08T18:51:29.273

UPDATE: enabling ACL on the NAS seemed to fix the permission errors. – chuckkahn – 2015-08-09T23:10:51.100

4Getting permission denied, the heck. I am the only user of this PC too. – hak8or – 2015-09-07T02:35:47.787

@hak8or maybe it depends on windows version? I'm getting access denied too on Win10. – Andrew Savinykh – 2015-10-12T00:15:16.867

4I too am getting access denied on Windows 10. – GiddyUpHorsey – 2015-11-01T00:36:02.553

5Doesn'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 – 2015-12-04T23:01:57.577

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 – 2017-03-15T22:40:37.063

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 – 2018-12-19T20:40:16.913

11

How about using the mklink command in the command prompt to create a symbolic link

mklink /d C:\Users\Nikhil\AppData\Local D:\AppData\Local

and then just move all the files/hidden files/sub folders from the C:\Users\Nikhil\AppData\Local to to your D:\AppData\Local directory

After that delete the Local folder on C:

Honestly though I haven't tried it myself so maybe give it a test drive in a VM first, you might have to create a separate symbolic link for each subfolder too

j_bombay

Posted 2012-09-21T20:22:42.987

Reputation: 640

Better to link a directory with the /J option – steampowered – 2016-11-20T07:07:18.193

3This 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 – 2017-09-10T00:26:51.100

1@steampowered why is J better? what's the difference or scenarios where it shines? – ahnbizcad – 2017-10-14T04:25:41.363

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 – 2019-06-20T16:40:05.043

1+1: This is how Microsoft redirects programs that have c:\Documents and Settings hardcoded in. – surfasb – 2012-09-21T22:56:51.663

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 – 2014-04-12T19:15:08.150

6

This isn't an answer to your question but probably a solution to your problem:

I'm thinking:

1: The hibernation file on most windows systems is huge.
2: You don't need hibernation since you have an SSD which lowers boot time.

Disable hibernation with the command:

powercfg –h off

in an elevated terminal. (a terminal run as administrator)

On my system it freed 12GB of drivespace because hiberfil.sys is no logner needed.

This would - for me - be a much better solution than moving the %appdata% folder, since moving it to a spindisc would slow down drive-access for every affected program, thus defeating the purpose of the SSD..

Mark Robotto Moore

Posted 2012-09-21T20:22:42.987

Reputation: 61

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 – 2014-08-06T12:13:27.513

1On 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 – 2016-07-04T06:24:06.410

2

Folder redirection for All subsequent data will be saved at the new location by default. Using the registry method Shell Folder/User Shell Folder

Microsoft's articles Folder redirection did show steps of how to change the location of the "Desktop" folder by using Folder Redirection. Replace desktop with AppData, Start Menu and etc as stated in the article.

Edward Chan JW

Posted 2012-09-21T20:22:42.987

Reputation: 121

2

Microsoft does not recommend you move the %AppData% folder out of the system drive.

You can use TreeSize Free see if there other ways to remove files. Sometimes hibernation and pagefile.sys are candidates on the c:\

You also have %AppData%\Local\Temp which could be redirected to your non-SSD drive.

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

Sun

Posted 2012-09-21T20:22:42.987

Reputation: 5 198

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 – 2019-06-20T16:03:37.330

@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 – 2019-06-21T18:27:03.487

1

It's possible to move Outlook .pst files to a different location and then change your profile to point to the new location. See the Microsoft article

David Marshall

Posted 2012-09-21T20:22:42.987

Reputation: 6 698

1A 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 – 2012-09-21T21:34:51.373

Right click the Local folder, click Properties. Use the Location tab to put it where you want. – David Marshall – 2012-09-21T21:48:29.497

0

Over a period of time I mysteriously lost 100gb HD space. "Space Monger" revealed it was in "Users" under "appdata" and sub folders of Google. I think these are hidden files. Research online suggested that since these are temporary files (not system) I should be able to delete them. Space Monger provides this option so I did. I've recovered my 100gb's with no noticable ill effects. Win 7 Home Premium 500gb HD. I'm not a tech., tried it, and it worked. No guarantees.

Bazza

Posted 2012-09-21T20:22:42.987

Reputation: 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 – 2018-03-29T21:13:28.213