Jump To a File in Windows Explorer Directly From Visual Studio
Did you know that recent versions of Visual Studio all come with the handy little
feature of being able to jump directly to the folder that contains the file you're
currently working on?
The option isn't available from the menu bar by default, but you can find it by
right-clicking on the tab that contains the filename at the top of any open file
and selecting "Open Containing Folder" from the context menu. Visual
Studio will fire off Windows Explorer and open the folder that contains the file.
It'll even automatically highlight the file in question so you can find it easily.
It works best when your working with a file that's either hosted on a web server
running on the same machine or when you access files via a network share. If
you're using either FTP or FrontPage Server Extensions to access the site, it'll
still open an Explorer window for you, but it'll be focused on the locally
cached version of the file in question and not the original. This is fine if
you're doing something like sending the file to someone via email, but it's not
so useful when you need to modify the NTFS access permissions.
If you find yourself using this tip a lot and right-clicking isn't really your thing,
you can also assign a hotkey to the this (or any other) command by using the
"Tools -> Options" menu. You'll need to ensure that the
"Show all settings" checkbox at the bottom of the dialog box is checked
and then you'll find the keyboard settings under "Environment -> Keyboard".
The command in question is called "File.OpenContainingFolder".
The hard part is finding an easy to remember keyboard shortcut that isn't already in use!
If you have a tip you would like to submit, please send it to:
webmaster@asp101.com.