views:

278

answers:

6

Something I've wondered about for a while now and would like to get a general opinion on:

Advanced apologies if this has been asked previously, I did a search and couldn't find anything similar. This question is related to questions like, "Correct location to save a temporary file in Windows?" , but not quite the same.

I've noticed over the years spent with Windows, from XP to Vista and now to 7, that the 'My Documents' directory has slowly turned from being a place where you're encouraged to place personal 'stuff' into a dumping ground for any junk any random application wants to store.

For example, if I look now at the 'My Documents' directory on my work xp machine, there are folders for Adobe, FX Composer, Maya, Processing, Visual Studio 2005/2008, Visual Studio Samples, Window Clippings, Evernote.... the list goes on and on.

In fact, the last thing that I'd ever use that folder for now is storing my 'stuff' - the very thing it was intended to do. I personally find storing my actual documents in there, along with these random application settings too disorganized and painful to sort through. Plus there are added headaches with backup software etc... The signal to noise ratio just becomes appalling.

Lamenting aside, I now find myself in the position of writing some code where I want to store some settings related to my application. These settings ideally should be 'global' (our software gets regular updates), so storing them in some Program Files directory that's likely to be ephemeral won't work. While settings themselves could be stored in the registry, what about backup files, compressed archives, samples, etc etc...

So really what I'm asking is, what's the right solution for this situation? Do I follow the crowd and use 'My Documents' as a dumping ground? Is that folder a write-off anyway, or am I adding to the problem?

Do you use 'My Documents' as a storage area for your applications? Do you share my frustration with all the junk that turns up in there?

The users of my software are semi-tech-savy, so would probably understand it's just a directory like any other (and so could handle it being elsewhere) - but I guess Aunt Edna isn't going to understand that, so does the answer depend on context?

Thanks in advance!


Edit:

Thanks for the suggestion of %APPDATA% - I guess this is fine for application settings and files that shouldn't be exposed to the user, but what about files that might be useful for the user to move/manage themselves? Is My Documents the only solution or should I still stick to %APPDATA% ?

+6  A: 

If these are application-private files (i.e. not user-visible documents) then isn't this what the %APPDATA% folder is for?

hobbs
+3  A: 

Just because applications are dumping stuff into "My Documents" doesn't mean they should. At the very least, if you need to dump things there, then make the folders hidden. Really, you should use %APPDATA%.

Michael Aaron Safyan
+4  A: 

Not a good idea as a 'dumping ground', but it simplifies backup, for a start.

In my workplace, users' My Documents folders are all on a network drive for ease of capture by an automatic backup system.

pavium
I would imagine this is one of the main reasons for software using My Documents. Users are less prone to data loss since roaming profiles are far less deployed than My Documents on a server, in my experience.
Phil Hannent
+4  A: 

Just make this configurable at install time, and later by the user. Ideally give them just two choices, one being My Documents and one being APPDATA.

Make APPDATA the default but do allow this to be easily changed at install time for enterprise admins who want everything in the My Documents folder which is automatically archived.

Michael Dillon
Probably the most practical solution. Thank you.
Ali Parr
I wouldn't make it configurable at install time. Most users will have no idea what it means, unless your app has a very specialized audience, so this just makes the installation more difficult and worrisome for the user.
Kristopher Johnson
+2  A: 

I'd say that Application Data is the place to keep settings etc., whilst My Documents (possibly in an application-specific sub-folder) would be the default place to keep output data files produced by your application.

Having the latter configurable via your installer / application settings dialog would be the nicest all-round solution.

PD
A: 

How about following the unix/linux tradition of storing it under ~/.app_name? Just make sure it's hidden, and ~ could be the "My Documents" folder

hasen j