I ordered Windows Vista Home Premium from NewEgg this morning. I honestly can't wait for it to arrive, as I've been absolutely dying to try the new features. One of my favorite features has got to be the new directory structure. I use Linux here and there, so the C:\Users directory makes much more sense to me than C:\Documents and Settings. After all, is Music really a "document"?

With this brand-spanking-new operating system making a home on my hard drive, I decided to be a little more strict with my file management. To be honest, my system is currently trashed. I've got programs lying all over the place, start menu shortcuts that point to nowhere, broken icon associations, and you'll probably die when I show you my Explorer context menu.

Some of this stuff, however, isn't really my fault. There are developers out there that just throw log files into a directory and call it good, or install a program wherever they please. You have no idea how annoyed I get when I open up My Documents only to find that there's a new Adobe directory sitting there. Did I ever say that I wanted an Adobe directory in My Documents? No. My Documents is like my home. You should stay out of my home unless invited!

I admit that I have done this. Sometimes I have my programs write to a file in its own directory because I'm lazy. I'm trying to change my ways. No, really. I am.

Anyway, here's a few file placement tips for developers:

  1. Don't put ANYTHING in my home directory without first asking me. EVER.
  2. ALWAYS use Environment.SpecialFolder (in C#, at least) to get a special directory's name. Never assume a directory has the same name on all systems.
  3. Store user-specific settings and files in a sub-directory of C:\Users\%username%\AppData\Roaming (preferably a directory with the same name as your company/application)
  4. For files that are not user-specific, place them in a sub-directory of C:\ProgramData (again, preferably with the same name as your company/application)
  5. Executables should go in C:\Program Files (I really wish they had made ProgramData the location for executables with a symbolic link to Program Files)

Go ahead and post any tips you think I missed in the comments!

Technorati Tags: ,,