1

I am trying to change the default path where a program stores its settings. The program is Just Gestures. It's stores its settings in C:\Users\%userprofile%\AppData\Local\Just Gestures and i want to move it out of C drive. My OS is Windows 7.
Can i do that with using environment variables or maybe creating symbolic link?
I know i can change the Users folder location but microsoft doesn't recommend doing that because updates will not work.

  • Changing for just one application would probably be difficult, since the application is probably looking for the Local App Data folder. You could probably symlink the "Just Guestures" sub directory though. – heavyd Feb 4 '15 at 20:45
2

I've used the steps below to do what you're asking.

  1. First create a new folder on the target drive (I'll call it D:\Gestures for this example) and name it whatever you want.
  2. Run the Command Line (CMD.exe) as Administrator.
  3. Copy everything from the C:\Users\%userprofile%\AppData\Local\Just Gestures folder to the newly created folder using: robocopy "C:\Users\%userprofile%\AppData\Local\Just Gestures" D:\Gestures /MIR
  4. After everything has been copied to the new location, you can delete the contents of the folder as you will be creating a junction to the new folder (backup the contents of the original folder just in case).
  5. Use mklink /J "C:\Users\%userprofile%\AppData\Local\Just Gestures" D:\Gestures to create the junction.

Note:

  • I've used the above for the Public folder on my C: drive.
  • Robocopy ensures that all files are copied (including any hidden files).
  • If you have spaces in folder names you have to use surrounding quotes (") in the command.
| improve this answer | |
  • On the last step i am getting error: Cannot create a file when that file already exists. This is the command i run: mklink /j "C:\Users\xxxx\AppData\Local\Just Gestures" E:\PortableApps\JustGestures\Settings – peter7558 Feb 5 '15 at 9:14
  • Did you delete C:\Users\%userprofile%\AppData\Local\Just Gestures as Yass advised? If you don't want to delete it you can rename it to "Just Gestures Backup" but it can not have the same name of course. The redirection would not work if the junction was distinguishable from the folder. – Syberdoor Feb 5 '15 at 9:31
  • I deleted Just Gesture folder and run this: mklink /j "C:\Users\xxxx\AppData\Local\Just Gestures" "E:\PortableApps\JustGestures\Settings". I also used quotes for the second path which i didn't use before because there is no spaces in the path but it turns out it is important. I receive a message that the junction is created and i can see the shortcut folder in AppData but when i open it doesn't redirect to the Settings folder. Now when i run the program it just stores the settings files in the both places. Is it how it suppose to work or the link folder should be empty? – peter7558 Feb 5 '15 at 10:37
  • The files are actually being stored in the new location. As a test, if you place a fairly large file in the original folder, you'll see that the size of the C:/ drive is not affected. – Yass Feb 5 '15 at 18:56
  • Yes, i got now how this work. It was confusing because when you open Document and Settings folder it redirects to Users folder and i thought the symbolic links will work the same way. – peter7558 Feb 5 '15 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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