Julie Lerman's DevLife

DevLife Part I [May 2005 - March 2007]

My Links

Blog Stats

News

A blog for DevSource.com.

This blog was originally part of the blogs.ziffdavis.com site from May 2005 through June 2007 when the blog was moved to the Movable Type blog engine and hosted at blog.devsource.com/devlife.
The original blog was eventually shut down and I was given the posts so that I could host them on my own site.


Archives

20+ years of programming and I never knew this before - Environment Variables in Windows Explorer

I learned something new today. It reminded me of a day in 1988 (?) that  I learned some DOS prompt command that I was astonished (and embarrassed) I had not been aware of in “all those years” of computing. I can't seem to remember what it was - perhaps something as simple as PRINT (but definitely not that one). What I learned today is that you can use environment variables in Windows Explorer.

Of course, I shouldn't admit this publicly, but that would just be so unlike me. If this has managed to evade me for all of these years, then perhaps one or two other people out there aren't aware of it either. So my public shame is somehow for the greater good, right? I can keep telling myself that!

Did you know you can type “%AppData%” into the windows explorer address bar and it will open up the “C:\Documents and Settings\currentuser\Application Data”. Geeze, I didn't! Or if you want to get to All Users (I have applications that persist data there, so occasionally I need to go look), you can type in “%AllUsersProfile\Application Data” and it will bring you to “C:\Documents and Settings\All Users\Application Data”.

There are a host of others. It's all related to Shell programming of course and even .NET has shortcuts to get at these folder (VB's “My” Namespace can get you to a small handful of these with My.Computer.FileSystem.SpecialDirectories. The CLR way is to use the Environment.SpecialFolder enumerations.

Here's a Wikipedia entry on the variables.

posted on Monday, August 14, 2006 9:25 AM