The Command Prompt or CMD is a very useful tool in Windows. Although there aren’t a lot of users that bother to try it out, it still is a favorite place of many programming geeks out there. If you’re one among them, then your dependency on a mouse is really low or none at all and all you wish to do is control your system with mere keystrokes.
Table of Contents
CMD Guide: Open Any File or Folder using Command
This is where the Command Prompt shines. It lets you open any file or folder on your computer with minimal cursor changes or a mouse dependency. So if you’re trying to inject your brain with more information about opening files or folder with CMD, then our CMD guide to open any file or folder using command will surely help you.
Step 1 – Open Command Prompt
There are multiple ways to open the Command Prompt on your PC. First, you can open it by simply pressing the Windows + R keyboard shortcut. Also, by pressing the Ctrl + Shift + Enter keyboard shortcut command, you can run the Command Prompt as administrator. Finally, you can click on the Windows search button, type in cmd, and open the Command Prompt from there. By right-clicking on the result, you’ll have the option to run it as administrator.
Step 2 – Opening any file or folder using CMD
How to open a folder
- In the Command Prompt window, enter down the following code:
Here, simply replace the phrase folder name with the name of the folder you want to open. For example, cd\Example folder will open that particular folder in the drive
- After entering the code, press the enter key. This will give you a new follow up line. Continuing with it, type in start. (followed by the period) and then press the enter key. This will open the respective folder on your computer
How to open a file
In order to open a file using the Command Prompt, we have three ways. One is to move to the folder that contains the file and then open the file. The second way is to simply open the file directly by entering down its path. The last way is to command a specific application to open a file for you. Below, we’ll list the steps for both the ways of opening a file with the Command Prompt. Just read on carefully and apply the steps precisely.
Method 1 – move to the folder first and then open the file
- The first step is to enter down the command for the location of the folder. This is the same step as opening the folder through the Command Prompt but there’s something you should know before attempting. Open the command prompt and enter the following code for the folder that contains the file you want to open:
Same as before, replace the phrase folder name with the actual name of the folder. You can add another slanding line(\) if there are folders within a folder. An example will be cd C:\Users\mini\Desktop
- Then, press the enter key. The next step is to enter the file name. After pressing the enter button, simply type in the file name along with its extension, all of them inside double quotes(“). An example is “example file.png”
Method 2 – open the file directly
- In order to do this, all you have to do is enter down the entire file path including the file extension. Simply enter the full path and add the file and its extension along with it, all in one single command line. An example will be “C:\Example folder\file.png”
- After entering down the line of code, simply press the enter key and the respective file will open.
Method 3 – commanding a specific application to open a file
- For this, open your Command Prompt and enter down the whole path of the application like this C:\Users\mini\”%windir%\system32\mspaint.exe”
- Then, along with the above line of path, enter down the whole path of the file like “C:\Users\mini\Desktop\travel.png”
So together, it should read C:\Users\mini\”%windir%\system32\mspaint.exe” “C:\Users\mini\Desktop\travel.png” in a single command line as shown in the screenshot
- Finally, press the enter button and see the commands in action!
- How to Fix When Red X Volume Icon Appear in Windows 10
- How to Fix If MKV file not playing on Windows 10
- Fix Slow Hard Drive on your Windows 10
- How to Set Up Multiple Monitors on Windows 10 With Different Resolution
- Fix Can’t Hear Cortana speak in Windows 10
- Bluetooth Speaker Not detected in Windows 10: How to Fix?
With that, we’ll conclude our guide on opening any file or folder with the Command Prompt. Since we have several methods of doing this, you can choose one that you feel is most suitable for you and it will get things done with a few keystrokes on your computer. That said, we hope reading the article above has equipped you with some bit of information. Please let us know by commenting down below if you have any further queries regarding the same.