In this guide I will show you how to open a folder from command line. There are two ways that I like to do this. One is when you open a relative folder and the other is when you want to open an exact path. One of the main reasons I do this is if I want to inspect the files in the folder more closely.
Open Relative Folder
Let’s say you are in command line and you have navigated to the parent directory of a folder that you want to open. Inside this folder that you have navigated to in command line, is a folder called example_folder
. To open this folder we can simply use the command below.
start example_folder
This will open the example_folder
in File Explorer. Sometimes it will take a second or two before the folder opens up. I am not sure why there is a delay, but in the end it works!
Open Exact Path
If we are not close to the the folder then we can open the folder via this method. Essentially what we are going to do is call the Explorer executable and pass it a parameter to open the folder. Most systems should have Explorer.exe in the path settings making this another easy option. To open an exact folder, we would run the following command.
explorer.exe c:\Users\digiDank\Desktop
In this case we are opening the Desktop
folder that belongs to the digiDank
user. Like above, sometimes it can be delayed 1-2 seconds before it actually opens.
Important: If your path has spaces in it you will need to put quotes around the path. Here is an example of a folder that has spaces.
explorer.exe "c:\User\digiDank\Desktop\folder with spaces"
As you can see it was easy to open a folder from command line. There are two options, both of which are easy to use. Which method do you prefer using? Drop a comment down below to get the conversation started!
If you would like to suggest a new article or video to be released, please reach out via the Contact Page. I look forward to hearing your feedback and providing content that is helpful for you!