Switching Between Command Line and File Explorer

Written by Barry Dysert (last updated June 15, 2020)

1

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 space and then 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." ...

MORE FROM BARRY

Moving and Sizing Windows Using the Keyboard

Moving and sizing windows is a normal part of using the Windows operating system. There are times when you may want to do ...

Discover More

Updating a Device Driver

If you attach a new device to your computer or need to update a current device's driver, this tip provides the general ...

Discover More

Getting Narration through the Ease of Access Center

If you are blind or have a severe vision impairment, the Narrator feature provided in the Ease of Access Center found in ...

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

Counting Files and Subfolders Using the Command Prompt

There are times when you might need to know how many files or subfolders are in a folder. Using the command prompt, you ...

Discover More

Understanding the Command Line For Loop

A niche command that sometimes comes in handy is the FOR loop. It has several forms and therefore can serve several ...

Discover More
Comments

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}] (all 7 characters, in the sequence shown) 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 more than 7?

2020-06-15 08:53:05

Glenn

Great tip, Barry! I've been using batch files and the DOS prompt (Command window) for years but never knew of this. You just taught an old dog another new trick. Thanks!


Newest Tips