How to find and open files using Command Prompt

Sometimes searching for files on Windows 10 becomes difficult for users who are used to using File Explorer when they only remember a little bit of file information. In such cases, using Command Prompt will help you easily find the file you want. Moreover, Command Prompt also allows you to directly open files from the folder containing them.

How to find and open files using Command Prompt

How to open Command Prompt

Before searching and opening files using Command Promt, you must first open Command Prompt. There are several ways to open Command Prompt that you can use:

  • Press the Windows button to open the Start menu then type cmd, click the first search result to open Command Prompt . You can also right-click then select Run as administrator to open Command Prompt with admin rights

How to find and open files using Command Prompt

  • Another faster method to open Command Prompt is to use Run . Press Windows + R to open Run then type cmdor cmd.exeand press Enter or click OK

How to find and open files using Command Prompt

  • The next way is to use the Power User Menu. Press Windows + X then click Command Prompt (Admin) or press A to open Command Prompt with admin rights
  • Finally, you can command Cortana " open command prompt " to open Command Prompt

How to find and open files using Command Prompt

How to search for files using Command Prompt

In the Command Prompt window that just opened, you type in , replacing search term with the name of the file you want to find. In the example below, Quantrimang tries to search for files/folders named "funvideo".dir "\*search term* /s

How to find and open files using Command Prompt

After you press Enter for about 1 to 2 seconds, the search results will be displayed. All files/folders with names related to funvideo will be listed.

Now let's explain a little about the components in the above statement:

  • diris a command used to display files in the current directory but can also access data anywhere on the computer.
  • The dir command prompt \searches in the root drive of the current device.
  • /sdir command prompt search in all subdrives
  • Finally, the ampersand *is used by command line applications as a wildcard. It signals that the search command will search all file names that contain your search keyword.
  • Add a comma *to the end of the name, like this business*will search all files with the search keyword at the beginning of the name
  • If you put the mark *at the beginning, your search will only include results with the keyword after it. For example *.jpg.
  • If you put the comma *at both the beginning and the end of your search term, you will cover all cases. Whether or not the keyword you entered is the actual name of the file, the file will still be listed in the search results.

Change drive to locate files more accurately

If you save the file in drive D: you will not be able to find it if you perform a search command in drive C:. Therefore, you need to change the directory according to the steps below.

First, type cd..and press Enter to tell Command Prompt that you need to change the drive. Next, to change to drive D, you need to type d:and press Enter . From now on, all commands will be executed on drive D.

How to find and open files using Command Prompt
Quantrimang's machine cannot execute this command because there is no drive D.

Now, you can search for the file you need by executing the command again dir "\search term*" /s. Note the use of the * symbol to search more effectively. If you enter it incorrectly, you will receive a "no label" error message like the example below. Quantrimang's advice is to always use two symbols * at the beginning and end of the search keyword.

Open files using Command Prompt on Windows 10

Once you find the file, you can open it immediately using Command Prompt with the default software.

First, you need to change the path to the folder containing the file. You can do this by using the command cdfollowed by the path to the folder containing the file. The best way to avoid errors is to copy the folder path listed in the search results.

How to find and open files using Command Prompt

Enter the file name with the full extension inside quotation marks ".."and press Enter. The file will be opened in the default software. You can open additional files if they are in the same folder as the original file.

How to find and open files using Command Prompt

How to find and open files using Command Prompt

After finishing, if you need to open other files, you can use the command cd..with the path to move to the new folder.

Good luck and please refer to other great tips on Quantrimang:

Sign up and earn $1000 a day ⋙

Leave a Comment

Top 5 Best Encryption Software 2025

Top 5 Best Encryption Software 2025

On your PC, a lot of your personal information can be accessed without permission. That's because Windows data is stored publicly on the drive and is not encrypted or protected by encryption software, so anyone can access your confidential and private information.

How to Install and Setup Android Studio in Windows

How to Install and Setup Android Studio in Windows

Android Studio is the official IDE (Integrated Development Environment) for Android app development and it is based on JetBrains' IntelliJ IDEA software. Android Studio offers many great features that help improve productivity when building Android apps.

Instructions for installing Windows 11, installing Windows 11 using ISO file

Instructions for installing Windows 11, installing Windows 11 using ISO file

Windows 11 is officially leaked and you can even install it right now.

How to enable or disable associated device names in Windows Share

How to enable or disable associated device names in Windows Share

Phone Link lets you access your mobile device from your PC instantly. And users have the option to enable or disable the display of linked device names in Windows Share.

How to Change Tab Color in Windows Terminal

How to Change Tab Color in Windows Terminal

Since Windows Terminal Preview version 1.23.10353.0, Microsoft has added color customization so you can change the color according to your needs.

How to open Control Panel on Windows 10, 8.1, 7

How to open Control Panel on Windows 10, 8.1, 7

Accessing the Control Panel will help you adjust many system settings, because the Control Panel in Windows is a collection of applets, which are like small programs, each of which is used to configure different aspects of the operating system.

How to set different wallpapers on each monitor Windows 10/11

How to set different wallpapers on each monitor Windows 10/11

Setting up multiple monitors on Windows is quite simple and only takes a few minutes to do. After setting up multi-monitor mode (multiple screens), you can set up separate wallpapers for each screen. To do this, please refer to the article below from WebTech360.

How to run multiple instances of a Windows program

How to run multiple instances of a Windows program

There are a number of ways you can run a different version of the same application. The following guide will explain which method is best for a particular type of program.

How to find and open files using Command Prompt

How to find and open files using Command Prompt

This is a method of searching and opening files that is said to be faster than using File Explorer.

Windows Mail is going away, what should I know?

Windows Mail is going away, what should I know?

After a long period of “living on the sidelines,” the Windows Mail, Calendar, and People apps are slowly approaching the end of their lifecycles. Microsoft recently updated its official documentation to clarify that the aforementioned apps will be completely retired on December 31, 2024.

Microsoft removes a barrier preventing users from updating to Windows 11 24H2

Microsoft removes a barrier preventing users from updating to Windows 11 24H2

Shortly after the official launch of Windows 11 version 24H2 last month, Microsoft acknowledged an unexpected issue with the Voicemeeter app.

5 Windows Apps You Should Uninstall Now

5 Windows Apps You Should Uninstall Now

Windows computers come with a number of useful Microsoft apps, such as Notepad, Photos, and Paint. However, it also includes a number of apps that are not very useful and are worth removing.

What is Windows Superfetch (SysMain)? How to disable Superfetch?

What is Windows Superfetch (SysMain)? How to disable Superfetch?

SuperFetch is available on Windows versions but is known by very few users. In the article below, WebTech360 will guide you how to enable or disable SuperFetch on Windows 10/8/7.

ChatGPT App for Windows Officially Launched

ChatGPT App for Windows Officially Launched

While there is no official Windows version yet, Microsoft Edge and Chrome let you use ChatGPT just like the native Windows app.

Microsoft drastically improves Windows Update, updates will be installed much faster

Microsoft drastically improves Windows Update, updates will be installed much faster

Windows 11's only major update - version 24H2 - was released on October 1 and included quite a few new features.