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:

Leave a Comment

Converting MBR to GPT Without Data Loss in Windows 11

Converting MBR to GPT Without Data Loss in Windows 11

Discover how to safely convert MBR to GPT without data loss in Windows 11. Follow our step-by-step guide using built-in tools and third-party software for a seamless upgrade to modern partitioning.

How to Fix 0x80072ee7 Store Connectivity Error

How to Fix 0x80072ee7 Store Connectivity Error

Struggling with the 0x80072ee7 Store connectivity error? Discover proven, step-by-step fixes to restore your Microsoft Store access quickly and easily. Say goodbye to frustrations!

How to Fix Background Change Error on Windows 11 Pro

How to Fix Background Change Error on Windows 11 Pro

Struggling with background change errors on Windows 11 Pro? This step-by-step guide helps gamers fix the issue fast, restoring your custom setups without hassle. Discover proven methods to personalize your desktop effortlessly.

How to Setup Windows 11 Dynamic Refresh Rate

How to Setup Windows 11 Dynamic Refresh Rate

Discover how to set up Windows 11 Dynamic Refresh Rate for buttery-smooth performance on compatible displays. Follow our step-by-step guide to optimize your PC

How to Fix Windows 11 Memory Leaks in Browsers

How to Fix Windows 11 Memory Leaks in Browsers

Struggling with slow browsers on Windows 11? Discover proven fixes for memory leaks in Chrome, Edge, Firefox, and more. Boost performance and end frustration today.

Solving Windows 11 Photos App File System Error

Solving Windows 11 Photos App File System Error

Struggling with the Windows 11 Photos App File System Error? Discover proven, step-by-step fixes to restore your photo viewing experience without hassle. Updated with the latest troubleshooting tips for seamless performance.

Troubleshooting Windows 11 OBS Studio Black Screen Fix

Troubleshooting Windows 11 OBS Studio Black Screen Fix

Struggling with OBS Studio black screen on Windows 11? Discover proven fixes for smooth streaming and recording. Step-by-step guide to resolve black screen issues quickly and easily.

Solving GPT Partition Style Not Supported on Old PCs

Solving GPT Partition Style Not Supported on Old PCs

Struggling with "GPT Partition Style Not Supported" error on your old PC? Discover proven solutions to convert partitions safely, upgrade your system, and get back to smooth computing without data loss. Perfect for legacy hardware users.

Solving Windows 11 Stylus Pen Pressure Sensitivity Fix

Solving Windows 11 Stylus Pen Pressure Sensitivity Fix

Struggling with stylus pen pressure sensitivity on Windows 11? Discover proven fixes to restore smooth, responsive drawing and note-taking. Step-by-step guide with tips for optimal performance.

How to Use Windows 11 Power Shell as Administrator

How to Use Windows 11 Power Shell as Administrator

Discover step-by-step how to use Windows 11 PowerShell as administrator. Learn to launch, run commands, and troubleshoot with elevated privileges for ultimate control. Perfect for beginners and pros alike.

How to Take a Screenshot on Windows 11 (All Methods)

How to Take a Screenshot on Windows 11 (All Methods)

Discover all essential methods to take a screenshot on Windows 11, from basic keyboard shortcuts to advanced tools. Get step-by-step guides, tips, and tricks to capture your screen perfectly every time.

Best Java Settings for Windows 11 Performance

Best Java Settings for Windows 11 Performance

Discover the ultimate guide to optimizing Java settings for Windows 11. Boost performance, reduce lag, and enhance your Java apps with these expert-recommended tweaks for maximum efficiency.

How to Setup Windows 11 BitLocker on External USB

How to Setup Windows 11 BitLocker on External USB

Discover a step-by-step guide on how to setup Windows 11 BitLocker on external USB drives. Protect your data with easy encryption tips, troubleshooting, and best practices for ultimate security.

How to Fix Windows 11 Clock Out of Sync Error

How to Fix Windows 11 Clock Out of Sync Error

Struggling with the Windows 11 "Clock Out of Sync" error? Discover proven, step-by-step fixes to resolve time synchronization issues, restore accuracy, and keep your PC running smoothly. No tech expertise needed!

Troubleshooting Windows 11 VBS and HVCI Gaming Lag

Troubleshooting Windows 11 VBS and HVCI Gaming Lag

Struggling with gaming lag on Windows 11 due to VBS and HVCI? This comprehensive guide explains what they are, why they cause stuttering, and step-by-step troubleshooting to boost your FPS without compromising security. Get back to seamless gaming today!