Switching Between Command Line and File Explorer

by Barry Dysert
(last updated August 29, 2016)


Have you ever been in a folder in File Explorer and wanted to bring up the command prompt at that same location? (Working with the command prompt can be found in other WindowsTips.) Or perhaps you're already at the command prompt level and want to bring up File Explorer at your default directory. Both of these things can be done quite easily.

Let's take the first case. Say you're in File Explorer and looking at the files in a folder called C:\Users\Barry.Dysert\Documents\Personal\Tips.Net. You want to do some things with the files in that folder that could be more easily done from the command prompt level. Instead of bringing up a command window and typing that long directory string, you can accomplish your goal simply by clicking in the address bar of File Explorer and typing (without quotes) "cmd .". (That's the string "cmd" followed by a period.) Immediately upon pressing Enter a command window appears, and its default directory is set to C:\Users\Barry.Dysert\Documents\Personal\Tips.Net. Now you can do your command-level work and close the window when you're finished.

In the second case, you're already in a command window, and your default directory is set to someplace long—say, C:\Users\Barry.Dysert\Documents\Personal\Tips.Net. In this case, you want to invoke File Explorer and have it set to that same folder. Easy enough; at the command prompt type:

C:\Users\Barry.Dysert\Documents\Personal\Tips.Net> Explorer .

(That is, type the word "Explorer", follow it with a period, and press Enter.)

Immediately, File Explorer launches, and it is pointing to your Tips.Net folder. Now you can work in File Explorer and close the window when you're finished.

 This tip (13461) applies to Windows 7, 8, and 10.

Author Bio

Barry Dysert

Barry has been a computer professional for over 35 years, working in different positions such as technical team leader, project manager, and software developer. He is currently a software engineer with an emphasis on developing custom applications under Microsoft Windows. When not working with Windows or writing Tips, Barry is an amateur writer. His first non-fiction book is titled "A Chronological Commentary of Revelation." ...


Ripping Songs from Audio CDs

Ripping songs from audio CDs is fairly simple, but the actual process varies from application to application.

Discover More

Breaking a Network Drive Mapping Association

Windows makes it easy to break the association between a network drive and its assigned letter. This tip explains how.

Discover More

Specifying a Copy Schedule in Robocopy

There are a few ways to set up a copy schedule in Robocopy by using its options. This tip explains how.

Discover More
More WindowsTips

Changing Font Size in a Command Prompt Window

If you work at the command level very much, you may want to change the fonts that are used. You can control what ...

Discover More

Using the Sort Command

Sorting data is a common task even of end users. Fortunately, The Windows command line provides us with a Sort utility so ...

Discover More

Completely Delete Files with Cipher

When you delete a file in Windows, the operating system only removes the file from view. The deleted content can still be ...

Discover More

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two less than 5?

2016-08-31 16:46:26

David H.

Does this run the Cmd Prompt as an administrator? Whenever I use the Cmd. Prompt I do so as an administrator. Perhaps if File Explorer is opened as an administrator it will open the Cmd. Prompt as an administrator? When looking at the Cmd. Prompt how can one tell if it's running as an administrator? Thanks and this is a great tip!

2016-08-31 09:09:04

Mike Walz

Thanks, Charles

2016-08-30 17:21:47


Thank you very much for all your kind words. I only wish I could think of some more tips to post. I think I've pretty well tapped out most of the goodies I know about.

2016-08-30 09:54:18

Thomas Redd

This is unbelievably simple! Thanks for this marvelous tip! Where have I been all my life? Why did I not know about this sooner? I absolutely LOVE your tips! Thanks for all you do.

2016-08-30 07:05:58

Shreepad S M Gandhi

Thanks Barry.
Once again, got to know about this for the first time. In my case (Windows 7 enterprise) launching the command prompt was achieved just by typing cmd followed by Enter. No period or space required. However, launching Windows Explorer was achieved only by Explorer followed by a space and a period. Absence of space and period didn't achieve the desired result.

2016-08-29 19:17:18

Craig Small

Really useful tip - thanks!

It seems that cmd. or cmd . works just as well in Windows 7. It makes sense that the space is needed from the command line - the "." is a parameter to "Explorer"!

2016-08-29 14:22:11


Great tip! For years I've been achieving equivalent functionality with three additional keystrokes:

Explorer %CD%

So Explorer .

Will save me typing!


2016-08-29 13:10:18

Steve Mackey

Cool Tip - thanks!

2016-08-29 12:39:11

Scott Renz

I love it.

I also saw the space between Explorer and the dot in your example with no problem.

2016-08-29 12:06:21

Gllenn Russell

It would have helped if you had pointed out that there should be a space before the period in each case. It's not real obvious (especially in the first case of going from Windows Explorer to command line).

2016-08-29 10:40:23

Rick Urquhart

Explorer. does not work in Windows 10
A space is needed:
Explorer .

2016-08-29 09:59:56

Mike Walz

I am a Windows 10 user and like the idea of being able to get a command window by typing cmd. I tried it and it works great. However, I could not get the Explorer command to work. Made sure the dot was there, tried explore and explorer, and also tried capitalizing, to no avail. Am I doing something wrong?


2016-08-29 09:53:01

Charles Ruffin

I found that "cmd." worked fine (once I figured out how to type in the address bar).
In the command window, when I tried "explorer." I found I needed "explorer .".
In other words, cmd no space period and explorer space period. Confusing to say the least.

Windows 10 ver 1607

2016-08-29 09:39:42

Cecil Britton

Thanks Barry. That is a very helpful one that I was unaware of. Will surely get use from me.

2016-08-29 09:08:08

Jennifer Thomas

Same problem as Faliq Isbah - I'm using Windows 7, in case that makes a difference.

2016-08-29 06:22:05

Faliq Isbah

When 'Cmd .' is executed, receive following message. Apparently Long folder names are not being supported. Any alternative for this beautiful tip?

"CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory."

Newest Tips

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.