Here’s the setup: you’re browsing around in Windows Explorer, finding that command line tool or whatever. You find the correct location. Now you need to open up a command line. So you start/run/cmd, change drives if needed, and either copy/paste the folder path from Windows Explorer into CMD or manually navigate using a series of CDs and/or tabs.
Here’s a trick I just learned today. I’m SURE this has been around forever, and is about as new as sliced bread. That being said, it’s a wonderful little shortcut and it deserves to be shared with everyone. It may only save a few seconds of real-time, but it saves a great many units of frustration-time. Here it is:
1) Find your location in Windows Explorer. In this case I’m browsing to the location of a NANT build script:
3) Type “cmd” and hit enter:
Boom. Nice, huh? There are a million different ways to skin this same cat, including installing power toys, scripts, shortcuts, etc. It’s nice, though, to utilize built-in shortcuts because they can be counted on across various Windows installations, specifically on production servers where you don’t necessarily want to install 3rd party tools or scripts.
Incidentally, this also works for “powershell”. And in both PS and CMD, there’s a way to reverse it. Type “explorer .” and Windows Explorer opens to your current PS/CMD location. My frustration level literally just went down a notch.
Earth shattering? Nope. Helpful? Duh.