How To Open A File/Folder In Command Prompt In Windows 11

5
(3)
Summary: In this article, we will show you how to quickly open a file/folder in Command Prompt and how to change the directory in Command Prompt in Windows 11 using a series of commands.

Usually, we perform a number of tasks via the GUI, but in fact, we can also do it in Command Prompt. This extends to opening files and folders, which you may want to do if you’re using a GUI-less install, or your File Explorer is broken. Today we’re going to show you how to open a file or folder in Command Prompt in Windows 11 in just a few seconds.

Open a File in Command Prompt in Windows 11

To open a file using Command Prompt, you just need to navigate to its folder and then type the file name. Here’s an example:

Step 1: Right-click the Start icon and choose Windows Terminal (Admin).win11_launch_windows_terminal

Step 2: Click the dropdown arrow next to the plus icon and select Command Prompt.

Step 3: In the Command Prompt window, type cd and the desired folder path. For example, if you want to open recovery tutorial.docx in the wonder folder on your desktop, type in the following command and press the Enter key. Here *** is your user name.

cd C:\Users\***\Desktop\wonder

open a file or folder in CMD

Step 4: Then type in your desired file name and the extension like “recovery tutorial.docx” and press Enter.

Step 5: Now, your file will open in its default program.

Open a Folder in Command Prompt in Windows 11

Similarly, you can open a folder in Command Prompt. But note that this is different from navigating to a folder in CMD because it will actually open the file in Windows Explorer:

Step 1: Follow the steps in the above method to open CMD, type the following command and press Enter. Here *** is your user name and you need to substitute the folder path with the folder you want to open.

start %windir%\explorer.exe “C:\Users\***\Desktop\wonder”

open a folder in CMD

Step 2: Then Windows will open your folder in File Explorer.

Conclusion

Besides opening a file/folder in Command Prompt, there are hundreds of things you can do with Command Prompt such as managing your services. So if you are interested, remember to follow our website and we’ll have more great articles to share later.

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 3

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Related articles

Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Share article

Latest articles

Popular articles