How To Search Files Faster on Windows 10 using Command Prompt.

 Searching Files Using Windows CMD.

Searching for a file in Windows is not an easy job if your files are not organized and one of the best ways to organize your files using tags keywords and later you can use those tags 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.

Press Start and type CMD, then press Enter to launch the Command Prompt. After successfully the Command Prompt, type dir, and press Enter to pull up a list of files and folders.

dir command in Windows CMD.


For moving down into a particular directory, type cd followed by a folder name (for example cd downloads) until you reach the folder you want to search.

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.  

cd command for Windows CMD


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 London holiday 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.

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 like this: dir “\Raveling*” /s 

CMD command to search file faster.


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 .pdf extension. You can try this for other files too (for example: .doxc, .png, .exe and more).

dir command to search files


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.    

  Follow Raveling Tech on Facebook and Twitter for more such technology related posts.

Post a Comment

Previous Post Next Post