Jump To a File in Windows Explorer Directly From Visual Studio

Posted: October 14, 2008 in ASP.Net, News

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!




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s