May 13, 2013

Open command window shortcut with the current/present working directory/folder

In my previous post, I had explained about opening command prompt and auto-executing a command.
I was thinking it would be better, if we have a shortcut to open a command prompt in the present/current working directory/folder.

I found two options to do that.
GUI (Windows 7 and above):
  1. Hold “Shift” keyboard key and “Right Click” your mouse button
  2. You will find an option “Open Command Window Here”, click on it
  3. It will open a command window and path would be your current directory

Custom Shortcut:
  1. Right Click your mouse
  2. Choose “New”
  3. Select “Shortcut”
  4. Enter type the location of the item as “cmd” and click on “Next” button
  5. Enter type a name for this shortcut as your own custom name e.g. CurDirCmdWindow and click on “FInish” button
  6. It will create a shortcut with your own specified name
  7. If you run/double click the shortcut, it will open a command window with the path “C:\Windows\System32” i.e. the default command window directory
  8. Now, we have to change the default opening directory to the drive where this shortcut located
  9. I hope you are familiar with %CD% environment variable in windows, which stores the current working directory path. We are going to use this now.
  10. Select the shortcut and “Right Click” with mouse
  11. Select “Properties”
  12. Now shortcut properties windows gets opened
  13. In “Shortcut” tab, navigate to “Start in:” textbox
  14. Replace the existing “C:\Windows\system32” with %CD%
  15. Note: Don’t change the target textbox content
  16. Click on “Apply” and then on “OK” buttons
  17. If you run/double click the shortcut, it will open a command window with your current directory as path.

Please send your feedback and comments to
Post a Comment

Featured Post

Java Introdcution

Please send your review and feedback to