Use The Command Prompt To Open And Display Folder Contents In Windows Explorer
One great feature of Windows is the capability to open any folder location in a Command prompt, from Windows Explorer, by right clicking on a folder and selecting "Command Prompt Here".

But if you use Windows command prompt often, there may be times when you want the reverse to happen…meaning you want to open a folder location from the command prompt, and have the folder and it's contents displayed in Windows Explorer.
To do this, open a command prompt from the keyboard by typing Win+R, or click on Start \ Run then type cmd in the run box and click OK.
Navigate to the folder you want displayed in Windows Explorer by using the Change Directory command "cd" (with out the quotes).
In the below screen shot I have cd to the Windows folder.

Now type the following command…
start .
Note: above command is typed as start, followed by a space, followed by a period.

…and Windows Explorer will open to the folder location that you were in at the command prompt, and display it's contents.

If you want Windows Explorer to open the parent folder of the current location, just type
start ..

In the below screenshot, the root of C:\ is the parent folder of Windows.

This trick is pretty cool and very useful for any command line geek.
Also, at the beginning of this article, I mentioned the capability to open a folder location in a Command prompt, by right clicking on a folder and selecting "Command Prompt Here".
In Vista, it is included by default, but in XP it is not. If you are missing this option in XP, you can add it to the context menu by following these steps:
- Click on Start \Run then type regedit and click OK
- In the left menu tree, go to HKEY_CLASSES_ROOT\Directory\shell
- Right click on shell and select New \ Key
- Name the key Open Command Prompt Here
- Right click on the newly created key (Open Command Prompt Here) and select New \ Key
- Name the new key command
- Select the newly created command key and double-click on default value
- Enter cmd.exe /k cd %1 and click on Ok
That's all there is to it!
Filed under Windows Tips, Windows Vista Tips by
Leave a Comment



Comments on Use The Command Prompt To Open And Display Folder Contents In Windows Explorer
above command is typed as cd, followed by a space, followed by a period.
should read
above command is typed as start, followed by a space, followed by a period.
@me
OOPS! Nice catch. I have corrected the error.
Thank you for the help. I have XP and I really missed this feature. I think it was there before in the previous Windows versions.
Windows directory is opened by using C:\Windows\Start.
How to close the opened window using command prompt.
@Kalpana
Typing "exit" (without the quotes) will close the prompt.
thank you very much. I've looked a lot for this information. But nobody reported the command for Vista … really thanks!!!!!!!!!!!!!!!!!!!!
Every time I try to open a folder via command prompt, I get a message that says it can not acces it. However, my computer is currently under a horrible virus that seems impossible to remove, but I feel that being able to open a folder somehow will help.
please again i need to open file or folder using command prompt from any where from my computer
how to retrieve folder that is lost because of the virus?
how to view the files which are opened at that time..
Thanks for a fabulously useful tip! I have XP and it works brilliantly. Profound thanks.
Hi and thank you very much this is great!
Just wanted to note, you can actually skip the 'cd' step altogether and type:
start \windows
this should do the same in one line instead of two!
thanks again great help for opening USB directory (since they tend to change drive letters)
OK, so I added the command prompt feature by going to folder options / file types / (NONE) File Folder / Advanced and added a Command Prompt CMD feature, then every time I clicked on a folder I got a command prompt, in my attempts to undo it I think I may have deleted the feature to simply double click on a folder to open it, now when i double click a folder it brings up windows search.
I am running windows XP, please advise.
hey im looking for how to display the contents of a folder IN command prompt, i need to delete some files from cmd launched from startup repair but dont know where they are
useful information
thanks..its working..
@nuked: Use command "dir" without quotations
That's to cool, thanks!
nice article …
@nuked:
Ever tried the command "help" without quotes?
Excellent tip. I had been looking and looking for some time on how to open the "My Documents" directory specifically.
In a command prompt, I would get to the parent directory (c:\users\paul), and then type "start "My Documents". All that would happen was that another command window would pop up. The actual directory wouldn't open.
I tried all sorts of things, Googling all sorts of various searches like "can't open My Documents folder from command line", etc.
After trying "start /?", and THAT not helping, and trying all sorts of commands, finally, I thought of trying "start explorer.exe \users\paul\My Documents" – AND THAT WORKED!
Wish I had found your site long before I came upon it myself with what seems to be simply another way to open up the "My Documents" directory!
Anyway, I like your version of the trick too.
The whole reason in the first place for me wanting to do this, was to be able to make a SHORTCUT of it so I could use my keyboard to open up my "My Documents" directory using a keyboard shortcut ("Ctrl-Alt-Shift-m"). I FINALLY can quickly open it up now as I've always wanted to.
Yay – and thanks.