How to open a file / folder in Command Prompt [CMD guide]

by Matthew Adams
Matthew Adams
Matthew Adams
Windows & Software Expert
Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things... read more
Affiliate Disclosure
  • The Command Prompt is a handy command-line utility with which you can open folders and files.
  • This how-to guide provides guidelines for how you can open folders and files with the Command Prompt.
  • The How to hub includes links to a plethora of how-to guide articles for Windows software.
  • Don't hesitate to learn more about this subject by visiting our dedicated Command Prompt webpage.
how to open folder in command prompt / cmd
To fix various PC problems, we recommend DriverFix:
This software will keep your drivers up and running, thus keeping you safe from common computer errors and hardware failure. Check all your drivers now in 3 easy steps:

  1. Download DriverFix (verified download file).
  2. Click Start Scan to find all problematic drivers.
  3. Click Update Drivers to get new versions and avoid system malfunctionings.
  • DriverFix has been downloaded by 0 readers this month.

Microsoft DOS (Disk Operating System) is a command-line platform that was the world’s foremost operating system during the 1980s.

However, DOS declined into irrelevance during the 1990s after Microsoft released Windows 95, which introduced the Start menu.

Nevertheless, Windows has retained a windowed replica of DOS in the form of the Command Prompt. That’s not entirely the same as the 1980s DOS platforms, but it has a similar command set.

You can open folders and files with the Command Prompt instead of File Explorer. This is how you can open folders and files within the Command Prompt.

How can I open files and folders with the Command Prompt?

1. Open the Command Prompt

  1. Open the Type here to search tool by pressing the Windows key + S hotkey.
  2. Enter the keyword Command Prompt in the search utility.
  3. Click Command Prompt to open it.
  4. You can also right-click Command Prompt and select Run as administrator to open it with admin rights.

2. Open a folder

  1. First, enter cd / in the Command Prompt, which will return you to the root C: drive.
  2. Then you can open a folder in the Command Prompt by entering this change directory command:
    The change directory command open folder in command prompt / cmd

    You’ll need to include the root folder and all its subfolders within the path to open a required folder within the Command Prompt.

  3. Press the Return key after entering the change directory command.
  4. To display a folder’s file content within the Command Prompt, type dir and press Enter. Then the Command Prompt will display a file and subfolder list for the folder.

3. Open a file

Alternatively, you can open files in the Command Prompt without moving to their folders first. To do that, you’ll need to enter a command that includes the full folder path for the file along with the file title itself.

For example, let’s suppose you need to open a file titled youcam_9.png from the path Users\mav_u\pictures. To do so, you would enter this command:


That file-opening command must always include quotation marks.

The full path open command open folder in command prompt / cmd

So, who needs File Explorer when you can open folders and files with the Command Prompt instead?

Ok, the Command Prompt may not be everybody’s cup of tea; but some users might still prefer its command-line flexibility.

idee restoro Still having issues? Fix them with this tool:
  1. Download this PC Repair Tool rated Great on (download starts on this page).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues with Patented Technologies (Exclusive Discount for our readers).

Restoro has been downloaded by 0 readers this month.

This article covers:Topics: