Move folders that are expected in specific locations

Oct 29, '10 07:30:00AM

Contributed by: michelcolman

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:

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.]

Comments (11)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20101028052156727