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.
In Vista and Windows 7 editions, application data is organized into two folders namelylocal 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.
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
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