Did you ever forget where you stored a file on your computer or simply couldn’t recall part of the name of a file that you desperately needed to find? You could have easily saved yourself some headache had you known how to find and open files (image, text, video, music) and folders using Command Prompt (CMD) in Windows 10. While it is a waste of time and energy using a command line interface to open files and folders under regular circumstances, it comes in handy under certain situations.

The Command Prompt offers a lot of cool tricks and lets you access a lot of Windows features, including many that are not accessible from within the GUI. Here, we will show you how to find and open files using the Command Prompt. While you can do it using the Windows File Explorer, the methods detailed below will help you if you forget the full filename or don’t remember where you stored it on your computer.

  • Find a File or Folder Using Command Prompt
  • Open Files in Command Prompt Via the Folder Route
  • Open Files in Command Prompt Directly
  • Specify an App to Open a File Using Command Prompt

Find a File or Folder Using Command Prompt

  • Open Windows Command Prompt in Admin mode by searching for ‘cmd’ in the Windows Search Bar and selecting ‘Run as administrator’.

  • You’ll get multiple results even if there’s only a single file with that name. However, you can easily identify the correct path by its size.

Once you know the precise path of a file (image, text, video, music) or folder, you can easily open that using the Command Prompt in Windows 10. Here’s how you do it:

Method 1: Open Files in Command Prompt Via the Folder Route

  • Firstly, specify the directory and folder of the file you’re trying to open. In my case, the target file lies in a folder called ‘Demo Folder’ at the root of the D: drive. So, we’ll first get to the root of the D: drive. For that, type in d:and press Enter as detailed in the earlier segment. You can drop this step if you’re trying to open a file in drive C:.

  • Now access the target folder with the following command: cd demo folder/

Meanwhile, you can also open files directly from the command prompt if you know the full file path. Here’s how you do it:

Specify an App to Open a File Using Command Prompt

In both the aforementioned cases, the file will be opened using the default app associated with that file type. You can, however, specify any app on your PC to open that file. Say, your JPG files open with Adobe Photoshop by default, but you can open it with Paint (or any other compatible app) if you want. Here’s how you do it:

Now that you know how to find and open files and folders using the Command Prompt in Windows 10, go ahead, give it a shot, and let us know why you’re looking to use the Command Prompt to find and open files on your PC. In case you like working with command-line tools in Windows but the more feature-rich PowerShell is your weapon of choice, check out our tutorial on how to personalize Windows PowerShell on your PC. You can also check out everything about the Windows Terminal and how to install and customize it on your computer.