≡ Menu

Change Application Data location

Application data folder, by default, is located in user directory. In Vista and Windows 7 you can find it in ‘C:\Users\Loginid\Application Data‘ where as in Windows XP, you can find it at the location ‘C:\Documents and settings\Loginid\Application Data‘. But in case if you want to move application data folder to some other location you can do it by editing registry keys. The procedure is different from Windows 7 to XP, as application data folders are structured differently in Windows 7.

Windows 7/Vista

In Vista and Windows 7 editions, application data is organized into two folders namely local and roaming. The default appdata registry key points to the roaming folder location where as a new registry value ‘Local Appdata‘ is introduced to point to the local appdata folder.

In Windows 7, we can change application data folders location using GUI also. You can open application data folder by running appdata from Run window. right click on the folder for which you want to change the location, click on location tab and specify the new path of the folder.

As with Windows XP, we can change the location by editing registry key too.

To change local application data folder we need to run the below command.

reg.exe add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Local Appdata" /t REG_SZ /d/f

To change roaming application data folder the command is:

reg.exe add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Appdata /t REG_SZ /d/f

If you see any issues in changing application data folder location please write it in the comments section below.

Windows XP

In Windows XP we can change the location of Application data folder by editing the registry value Appdata under the following node in registry.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

Registry value: appdata
Type: REG_EXPAND_SZ

You need to assign the path of the new location to the above registry value.

Instead of opening registry editor and editing the key manually you can simply run the following command in a command window.

Reg.exe add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Appdata" /t REG_SZ /d/f

For example to make e:\appdata as the new location of appdata folder the command would be:

Reg.exe add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Appdata" /t REG_SZ /d "e:\appdata" /f

Relevant Posts:

Opening application data folder from Run window

15 comments… add one
  • Anonymous

    Thanks for pointing me in the right direction. I'm running Win 7 on an SSD drive and I want to do as little i/o on that drive as possible. My RAM drive will work much better.

  • Techblogger

    the above regkey change works for windows 7 too

  • Irfan Ahmed Khan

    Dear Sir,
    Its giving access denied error that i have administrative rights kindly advice
    regards,
    Irfan

    • admin

      Make sure that you run the commands from elevated command prompt.

  • FabioGNR

    When i try to change location by GUI ( windows 7 )
    Everything goes right but there are a few locked files which i cant copy. Is there anyway of changing location during startup so those files aren’t locked?
    Thanks for sharing the method.

    • admin

      There are some tools in the web which you can use to copy files even if they are locked.

  • murka

    Am i the only one who gets a complete windows breakdown after this change? Windows explorer stops working and i can’t access any files once i change the path and restart, requiring a windows reinstall.

    • admin

      This, by no way, should affect OS functionality. Installed applications might stop working, it will not break OS. There could be some other reason in your case.

  • Andres

    I made the changes but when I run “appdata” it still opens the location on the C: drive. I have restarted the machine after making the changes. I want to delete what’s in the C: drive appdata folder, but I’m not sure I can do that without losing all my stuff, and I can’t rename it. Any ideas? I need to free up space on my SSD C: drive to upgrade from Vista to Windows 7. Thanks.

    • Zachu

      Where I work we used to do the AppData linking like this, pointing it to different directory, but it seems like it isn’t working anymore. I do not know when did this break down but I can’t get it to work on my laptop either, so I assume they have made some changes on Windows that broke this down. :/

  • Thomas Le

    Thank you for this great information. I have been looking for a way to move the appdata directory! I have a 64GB SSD drive on my laptop and it’s killer with all that junk going to the C drive!

    • Thomas Le

      I am experiencing the same thing as FabioGNR said above. I can’t move my “Local” folder because of a couple files that are being used by SYSTEM. I figure that most of the data will be moved by having roaming and LocalLow folders moved. I also used the same technique (for windows 7) to move all the other folders to another location. Windows 7 really makes it easy, minus the Local folder.

  • raju

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\Raju>    Reg.exe add "HKEY_CURRENT_USER\Software\Micro
    soft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Appdata" /t REG_SZ
    /d "e:\appdata" /f
    
    Error:  Invalid key name
    
    C:\Documents and Settings\Raju>
    C:\Documents and Settings\Raju>Reg.exe add "HKEY_CURRENT_USER\Software\Microsoft
    \Windows\CurrentVersion\Explorer\User Shell Folders" /v "Appdata" /t REG_SZ /d "
    f:\appdata" /f
    
    Error:  Invalid key name
    
    I tried this please help me
  • Riko

    Change all the quotes sign (“) with your type, don’t copy paste…

  • warning

    do not try this at home

Leave a Comment