Open In App

Search Files Faster on Windows 10 using Command Prompt

Last Updated : 12 Mar, 2021
Like Article

Searching for a file in Windows is not an easy job if your files are not organized and one of the ways to search your files using tags keywords in the Windows Search box inside File Explorer. However, Windows File Explorer search results are not that accurate and it takes a longer time but why wait if you can search files much faster using Windows 10 Command Prompt.  

Finding Files Using Windows 10 Command Prompt. 

You can search files on your hard drive faster using Windows Command Prompt.

Step 1: Press Start and type CMD, then press Enter to launch the Command Prompt. After successfully launching the Command Prompt, type the below command, and press Enter to pull up a list of files and folders. 


Step 2: For moving down into a particular directory, use the below command followed by a folder name,  until you reach the folder you want to search.

cd folder_name

Step 3: Now type dir command again but this time with your search term, follow dir with your search term in quotes with an asterisk term before closing the quotes (For example, type dir “Raveling*”) and press Enter. The command prompt will show you the file location along with the list of files name starting with a similar keyword. 

The asterisk is what’s known as a wildcard and, in our example, it stands for anything that follows the word ‘highlands’, such as ‘raveling.doc’, ‘raveling.xls’ or My Business plans.txt’.

If you don’t know the exact location of your file in your hard drive, then instead of manually navigating through your directories, start searching from the very top level of your hard drive and include every sub-folder.

Step 4: The top level of the drive is represented by a backslash and, to include subdirectories, you add a forward slash and ‘s’ to the end of the query as shown below:

 dir “\Raveling*” /s 

The above command is my all-time favorite because, with the help of this command, I don’t have to force my brain to remember the location of the files. This trick usually takes seconds to search the entire drive for the file.  

You can also search for a particular file type by using a command dir \*.pdf /s and it will show you all files saved with the .pdf extension. You can try this for other files too (for example: .doxc, .png, .exe and more).

Note: The position asterisk symbol in the command matter a lot so type carefully and check once before executing the command.

How all these commands work.

Now you know enough to find any file on your entire hard drive within few seconds but if you are more curious to know how all these commands are working and what all these symbols stand for, then continue reading this post.

Let’s discuss each term one by one:

  • dir command is for showing files on the current directory, but it can also show files from anywhere in the drive of the system.
  • / tells dir to search from the top-level or root directory of the hard drive.
  • /s is used for searching sub-directories.
  • * asterisk is using before text (for example *.pdf) show all files ending with .pdf and * using at the end (for example raveling*) show you all file-names starting with that word.

So, this is all that you need to know for searching any file quickly within a few seconds using Windows 10 Command Prompt. 

Similar Reads

How to Create a WiFi Hotspot in Windows 8 using Command-prompt?
WiFi (Wireless Fidelity) hotspot is a network with an area where wireless access to the internet is available. These are Internet access points that allow you to connect to a WiFi network using your computer, smartphone, or another device while away from your home or office network. There are lots of software that can create a WiFi hotspot. But usi
2 min read
How to Open Google Chrome Using Command Prompt on Windows 11?
Command prompt is a Windows-based utility that allows one to manage system files and folders, access core features as well as remove stubborn software. This can also allow the system to go directly into the websites open on a Google Chrome browser. But sometimes, one does not need to. For example, for developers, custom scripts. A command can be se
4 min read
How to Abort a Command Execution in Command Prompt?
Command Prompt is an interpreter that helps us to execute various commands and functions. It helps perform tasks, troubleshoot issues, and manage files more efficiently. But what if the command prompt gets stuck while executing a command? In that case, several questions might come to your mind like, " How to get out of it?", "Do I need to close the
5 min read
How to Change Colours in Command Prompt in Windows?
Command Prompt is a neat command-line interpreter that comes in-built with the Windows operating system. Command prompt is still used for performing various functions such as, collecting information on the network state of the computer, troubleshooting the system, deleting files, formatting computers, etc. Customizing the Command Prompt according t
2 min read
Command Prompt Hacks for Windows
The command prompt in Windows is equivalent to the terminal in Linux and Bash in MacOS. But the Windows command prompt comes with a wide range of customizable features. Talking about the command prompt, let's check out some interesting Tricks you can do in the Command prompt.  Table of Content 1. Encrypting the Files Using CMD2. Customizing the CMD
4 min read
How to Clear the Windows Command Prompt Screen?
The Command Prompt, a powerful tool in the Windows operating system, allows users to execute commands and perform various tasks with ease. However, the Command Prompt screen can quickly become cluttered with text, making it difficult to read and navigate. In this article, we will explore how to clear the Command Prompt screen in Windows, providing
5 min read
How to Open the Command Prompt as Administrator in Windows 11?
On any operating system, the Terminal or Command Prompt is an excellent tool that can be used as the Command Line Interface. And if you want to make some significant changes, Launch CMD in Administrator. As Windows 11 was launched a few days ago, for many it is difficult to Open Command Prompt as Administrator. This article will let you know the pr
5 min read
How to Shut Down a Computer using Command Prompt?
Sometimes, situations might arise due to either a windows bug or some malicious program that start menu tray won't open even on the press, leaving us with only forcing the desktop or laptop to shut down by either long pressing the power button or cutting off the power supply of the device. To overcome such a situation, there are various efficient l
2 min read
How to Format a Hard Drive Using the Command Prompt?
If you have been using the Windows Operating System for a very long time and want to get shifted to any other OS on the same device, then no doubt you have to use the same Windows Hard Drive. As there will be some new operating system present at the Hard Disk Driver, we have to Format Hard Drive for its long future. When you are going to change one
3 min read
How to Compress Files Faster with Pigz Tool in Linux
Pigz (parallel implementation of gzip) is a free, open-source multi-threaded compression software for Linux that compresses and uncompresses files. Pigz is pronounced as "pig-zee", it compresses data using the zlib and pthread libraries and takes full advantage of many processors and cores. Pigz can archive larger files significantly quicker than g
3 min read
Article Tags :