Stupid Geek Tricks: Navigate in the File Open/Save Dialog With the Keyboard
Sometimes in the life of a geek, we do something in front of a non-geek that shocks and amazes them. Sometimes it's as simple as typing three keystrokes into a file open dialog. (At least it was for me yesterday)
I was doing some work on my computer with a friend sitting next to me, and her jaw dropped when she saw me navigating through the file open dialog with just the keyboard… so I decided to write up a number of other keyboard methods as well.
Note: Expert geeks are excused from today's lesson, but there's extra credit for mentioning any methods that I forgot to include.
Navigate Up One Directory
This was what made my friend very surprised… as soon as any File Open/Save dialog is opened, just type .. (period period) and hit the Enter key:
After you hit the Enter key, you'll notice you are suddenly in the next directory up…

I'm sure you are less amazed than my friend was.
Navigate by Relative Path
You can type ..\ to get to the directory above the current one, and then start typing the name of a folder or filename.

You could even use ..\..\ or any number of levels to continue to traverse up the directory tree.
Navigate with Shell Folders
Included in Windows Vista (or XP) are a list of shell folder shortcut names that will let you type something as simple as shell:desktop to go to the desktop folder.
We've even got the full list of shell shortcuts for you.
Navigate with Environment Variables
You can use the built-in environment variables to quickly switch to a folder. For instance, to get to the Program Files folder you could type %programfiles%
A better example would be %appdata%, which takes you to the C:\Users\<username>\AppData\Roaming folder.
To see a full list of these variables, open a command prompt and type set. Just remember to surround the variable name with percent signs as shown in the example.
Navigate with UNC Paths
Even if you don't have a drive letter mapped to another computer, you can still open and save directly from a shared folder by typing in the UNC path to the server. Here's the syntax:
\\Servername\Sharename
You'll likely be prompted for your username and password to access that share (this would be the username on the computer you are trying to access, not the one you are on)
Navigate with FTP
You can even connect to an FTP server to open a file by using the following syntax (thanks to freddo for mentioning this)
ftp://user@servername/path/
After you hit the Enter key, you'll be prompted for your FTP password, and then you can browse the FTP site like a local folder. Note that this method will possibly be slow.
Navigate with Full Paths
You can just start typing the full path to a file if you'd like. It might take longer than some of the other options, but at least you've got full control.
Navigate with Copy and Paste
In Windows Vista, if you hold down the shift key while right-clicking on a file or folder, there will be a new option called Copy as Path, which will copy the full path of that file or folder to the clipboard.
You can then paste that path into the File name box and hit the Enter key to open it.

Note that you could use the keyboard to paste the path in, but I couldn't really take a screenshot of that.
Many of these methods work in other operating systems as well… for instance, you can use the ../../ method on Linux.


You can also connect to a ftp site with ftp://username:password@myftp.com/folder/
@freddo:
Excellent followup! You are absolutely right.
you can also filter out unwanted filetypes or filenames by typing *.txt or readme* or *me*
I'm embarrassed to admit how many of these I *didn't* know.
I'm well aware of the ..\..\ trick in the shell of course, but I didn't know it worked in file dialogs.
How I get the filename, encoding open and cancel option to display in windows vista.
Can i use those shell folder shortcuts on xp?
@Sgt Soy
Yes, you should be able to use most of them in XP. I sometimes forget and just write Vista.
I cannot use those Shell shortcuts on Vista's windows explorer, because on my computer the windows explorer do no display the "File name" option like in XP. Does anyone knows how to tweak vista so it will display the File Name.
I will appreciate your help.
@rimanere2
This article is talking about the file open and save dialogs.
You can, however, use the Shell shortcuts in the Explorer address/location bar.
Not sure how relevant this is, but dragging a file or folder to an open command-prompt window will stuff the path into the command-line (complete with quotes) and does not do a CRLF (press enter). This is especially useful when you're working with extra-long or complex paths.
As you said, not many surprises here.
I quite often use this on customers locked down PCs to get to directories they think I should not be in.
Ross
Cool! Work smart and save your time
not sure if this is a "jaw-dropping" trick, but in an open/save dialog box, when the 'Files of Type' box is limited to specific file types, e.g. like when the file types that can only be selected are *.txt files, you can use *.* to display all the other file types in the folder you're in
I'm a "little" amazed with the %programfiles% variable, though I've seen it in Registry during hackathons. My bad
To oldies like me that used to use the DOS prompt some of this is old news.
BTW if you access ftp like freddo said, does your username and password end up in the server access log?
@Dean:
Hey, who you callin' old? I resemble that comment!
As far as it showing up in the server access log, my guess would be that it's no different from doing anything via command-line. The server is going to see the login transaction the same as it would via any other method - it doesn't care what you use for a client (be it any explorer window, the CLI or a full-blown client). It just depends what level of detail the server (and anything in-between) is logging.
As far as it showing up in the *workstation* log, I don't know that anything gets saved there as the local workstation is not the device processing credentials so it doesn't need to hang onto that data. However, it might get cached somewhere, like the MRU keys in the registry.
Hope this helps, and that I'm making sense!
Oh, for what it's worth (back on the original subject, kinda…), when doing a file/save as, you can force the extension with quotes around the filename. ie: saving a .bat file from notepad as "myscript.bat" wouldn't require you to hit the drop-down and select *.* vs. *.txt in the filetype box. Works in any program (that I know of) with any extension, but the caveat is that programs like Word or Excel won't force the formatting appropriately because they convert the file in addition to just changing the extension.
A couple more obvious ones that I use (and have seen people remark on):
-> Alt + S to save
-> using the down arrow key to access the recent items list
@Vaibhav & pipo
Good tips! I completely forgot to mention those, which is strange cause I use the *.txt thing all the time.