Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Move folders that are expected in specific locations System
Quite a few badly written apps like to create folders in specific locations, and expect them to be there and nowhere else. For example, my ~/Documents folder contains items such as 'Microsoft User Data', 'Steam Content', 'TomTom', etc. Some even create folders in your home directory or worse, at the root level of the hard disk!

Sometimes you can set a different location in the preferences of the application, but sometimes there's just no way. If you move the folder, the application will become hopelessly confused and/or create a new copy where it expects it. You can make these folders invisible, but then you can't easily access them anymore.

To move the folder wherever you want to move it to (for example, into a separate 'User Data' folder), create a symbolic link where the app expects it, and then hide the link.

Unfortunately 'chflags hidden' does not work on symbolic links for some reason, so you have to use SetFile which is installed as part of Developer Tools or can be found in various other locations. Just try it, and if it doesn't work, do an advanced search on MacOSXHints for articles with 'SetFile' in the title. (You might also be able to use the '.hidden' file although that is considered to be deprecated).

So anyway, once you have SetFile, do the following:
  • In the Finder, drag the offending folder to its new location
  • Open Terminal, and type ln -s with the trailing space but without pressing Enter or Return
  • Drag the folder from the new location into the Terminal window.
  • Drag the old location (the folder where the offending folder used to be located, for example Documents) to the terminal window. The command in Terminal should now look something like ln -s /Users/me/User Data/TomTom /Users/me/Documents.
  • Make sure the Terminal window is frontmost, and press return to execute the command. You will see the link appearing at the old location in the Finder. It looks just like an alias.
  • In the terminal, type SetFile -P -a V (with the trailing space) and drag the link (the one with the little arrow that looks like an alias) from the Finder to the Terminal window.
  • Press enter.
The link is now invisible. To the application, it seems as though the folder is still there in its old location.

[crarko adds: I haven't tested this one, but the hint combines some proven ideas to accomplish its goal.]
    •    
  • Currently 3.82 / 5
  You rated: 1 / 5 (11 votes cast)
 
[11,559 views]  

Move folders that are expected in specific locations | 11 comments | Create New Account
Click here to return to the 'Move folders that are expected in specific locations' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Move folders that are expected in specific locations
Authored by: Nem on Oct 29, '10 08:10:37AM
You've got an extra hyphen (before the "V"). It should be:

    SetFile -P -a V filename

and then to make visible again (lowercase "v"):

    SetFile -P -a v filename

---
Nem W. Schlecht
http://geekmuse.net/


[ Reply to This | # ]
Move folders that are expected in specific locations
Authored by: michelcolman on Oct 29, '10 08:14:11AM

Correct, the extra "-" produces an error message (but fortunately the command still works despite the error).

I had sent an edit to carko shortly after posting, but I guess it didn't get there.



[ Reply to This | # ]
Move folders that are expected in specific locations
Authored by: crarko on Oct 29, '10 08:38:59AM

It's corrected now. Thanks.



[ Reply to This | # ]
Move folders that are expected in specific locations
Authored by: Anonymous on Oct 29, '10 08:27:04AM

This is a half-thunk out hint that's prone to failure: you move the linked folder and it breaks.

It makes far more sense to just hide the original folder.



[ Reply to This | # ]
Move folders that are expected in specific locations
Authored by: arkayn on Oct 29, '10 08:50:24AM

Not if you want to move the folder to another drive like I did with my Steam content folder.

I did not hide the sym link though.



[ Reply to This | # ]
Move folders that are expected in specific locations
Authored by: Anonymous on Nov 01, '10 09:09:07AM

This hint is about hiding content from the Documents folder.

Your situation is that you don't want to hide it, but you want it elsewhere. So this hint doesn't apply, and neither does my improvement.



[ Reply to This | # ]
Move folders that are expected in specific locations
Authored by: slb on Oct 29, '10 10:47:30AM

Why bother hiding it? I get the moving part, but hiding it would be something that at some point you may forget you did and seeing the symlink there would be better, IMHO.



[ Reply to This | # ]
Move folders that are expected in specific locations
Authored by: michelcolman on Oct 29, '10 01:42:20PM

The whole point is not having these folders cluttering your Documents, Home, or root directory. If you move them elsewhere but then leave visible symlinks, you haven't really uncluttered anything. That's why I hid them.



[ Reply to This | # ]
Look first...
Authored by: tedw on Oct 29, '10 06:51:54PM

I want to add that oftentimes there actually is a way to change the folder location, you just have to look around a bit. For instance, I downloaded TomTom Home just out of curiosity: yes, it defaults to using the downloads folder, but there is a panel in the preferences that allows you to change folder locations. sometimes you need to get a little more creative - looking in the preference plist file, or searching through the application bundle for other plists - but if the app was even remotely well-designed you can usually find some way of directly changing the storage location.



[ Reply to This | # ]
Move folders that are expected in specific locations
Authored by: poenn on Nov 03, '10 09:20:40AM

On a sidenote MS User Data CAN be moved to ~/Preferences and Office won’t create it again in ~/Documents



[ Reply to This | # ]
Move folders that are expected in specific locations
Authored by: TonyT on Nov 04, '10 02:02:44PM

I use a Backgammon game that insists on saving Application info in ~/Documents (it belongs in ~/Library/Application Support), and the developer refuses to either move it or set it as a preference setting.
I tried various hacks, but overlooked this obvious solution.

Thanks,



[ Reply to This | # ]