What Is the Benefit of Using the Command Prompt to Open Files?

Whether you are looking for all your files concerning one topic or just trying to find the one hiding among all the folders on your computer, try using the Command Prompt. It may make it more efficient for you. On top of that, using the Command Prompt is much faster and more responsive than opening the files from the File Explorer. This is true for video files, Windows Photos, Word documents, and heavy-duty games, as the GUI always consumes more memory and slows down the processes.

How to Open Command Prompt in Windows

To search for the files in Windows, you first need to launch Command Prompt. There are several ways to do this:

Through Search Box. Type cmd in the Windows search box, then click on the icon to open the window. It’s wise to always operate the command line as an administrator.

Use the Run window. A fast way to launch cmd is to press the Win + R keys, Then type cmd or cmd.exe and press Enter or click “OK.” To directly launch Command Prompt in Admin mode, press Ctrl + Shift + Enter.

Use Win + X : Another fast way to launch cmd is to use the Win + X combination, also known as the Power User menu. Among the various options in Windows 11, you will find Windows Terminal and Windows Terminal (Admin), which are the latest terminal emulators to run both Command Prompt and PowerShell from one window.

Note: in certain older Windows 10 versions, when you launch the Win + X hotkey combination, you may instead see the Command Prompt and Command Prompt (Admin) options.

Use Cortana: try Cortana if it works for you. As soon as you see ther Cortana is “listening” to text, say “open command prompt,” and it will open up.

How to Search for Files Using Command Prompt in Windows

Searching for files and folders using the command line is very easy. Follow the instructions below: What do all the terms mean in the command line search request?

dir is a command used to show files in the current directory but can also locate data elsewhere in the system.The backslash () tells dir to search from the root directory of the current drive./s tells dir to search all sub-directories.* is used by command-line apps as a wildcard. It indicates that the search will locate all file names that contain your search term.Adding an asterisk at the end of the name, like business*, will find all the files with your search term at the beginning of the name.If you use it at the beginning, your search will only include results with your text at the end. For example, *.jpg.If you add an asterisk at each end of the search term, you will cover all the bases. No matter where your text is in the actual name of the file, that file will be listed in the results.

How to Change Directories in Windows Command Prompt for Easy Access to Folder Paths

If your target file is located in D: drive, you won’t find it anywhere in the Windows folder from the C: drive. Therefore, you should change the Windows drive path in the command line as shown below.

How to Open Files in Command Prompt by File Name and File Type

We will explore a simple demonstration of how to open a file clearly visible to you as system administrator. To do this, you would need the location of the saved file. In this example, the file that we want to open is located in the Desktop folder.

How to Search for the Correct Files With Command Prompt

Within the destination drive, you can search for the correct file once again using the dir “search term*” /s command discussed earlier. Do take care to use the * wildcard, both at the beginning and end of the search term for a comprehensive search – especially if that folder has hundreds of files. It’s pretty common to make mistakes in the wildcards and backslash, which returns a “no label” error. If you type correctly, you will identify the folder path and the correct file name. If the folder path is very long, you can copy-paste the entire thing. Windows 11 has built-in support for copy-pasting in the command line. For Windows 10, check out this detailed tutorial on how to cut-copy-paste in the Command Prompt. The method is simple enough: use Ctrl + A to select the entire Command Prompt screen, then, release the mouse or trackpad click. This will make any part of the command screen selectable for a copy-paste action.

How to Open Files in Windows Command Prompt

Once you find the file you want to open, you can open it from the Command Prompt screen using its default program without having to locate it in your file explorer. Note: you can open multiple files from the Command Prompt once you’ve opened the correct folder. Here we are opening a single video file in the command line window. Navigating your computer’s files using the Command Prompt is very similar to doing the same with file explorer.

How to Open Files Using Windows Terminal

The Windows Terminal is just a modern extension of the Command Prompt. Opening files in Windows Terminal is no different than the above methods. Image credit: claudiodivizia by 123RF. All screenshots by Sayak Boral type [:][]