Windows 10 search box is a very efficient tool to search for a file or folder. But it is troublesome when you are performing a search over a variety of parameters. Not only it doesn’t entertain a huge no a file at a time, but the search process is also very slow. If you want to find specifically something on your computer, you can do it easily from Command Prompt.
Method-1 Use dir command –
1. You can easily launch the Run by pressing Windows key+R.
2. Then, type “cmd” and click “OK“.
Command Prompt window will be open.
3. First, you have to go to the hard disk drive where the file is on your computer.
4. Enter the name of the drive where you want to search in CMD and then hit Enter.
5. Now, copy–paste this command in Command Prompt window, modify it according to your need. Then, hit Enter key from your keyboard to execute it.
dir /s *file/ folder name or keyword in the file name*
Enter the name or part of the name of the file/ folder in the command between the * signs. Example– We wanted to find the “GTAV” file. So, the command should look like this-
dir /s *GTAV*
You will notice the file (or files) in the command prompt with elaborate explanations about its location, size, modification date.
Method-2 Using Where command
Copying the search results in the Notepad is an easier way to use the information elsewhere. To do this follow these steps-
1. At first, click on the search box beside the Windows icon and type “cmd“.
2. Then, right-click on “Command Prompt” in the elevated search result and click on “Run as administrator“.
3. In Command Prompt window, copy-paste and modify the command. Then, hit the Enter key to execute it.
where /r <file/ folder location> *file/ folder name*
Enter the name of the file/ folder in the command between the * signs with the file/ folder location
. Example– We wanted to find “GTAV.exe” at ‘e:\GTAV‘ folder location. So, the command, at our end, looks like this-
where /r e:\GTAV *GTAV.exe*
4. Now, if you want to see the results in the Notepad window, copy-paste this command and modify it. Then, hit the Enter key to execute the search process.
where /r <file/ folder location> *<file/ folder name>* |clip
After executing this command you won’t notice any results, as the results are already copied.
5. Click on the Search box beside the Windows icon and type “Notepad“.
6. Click on “Notepad“.
7. In the Notepad window, right-click on a space and then click on “Paste“.
You will see the search results in the Notepad window.
This way you can search any file/ folder by passing a single command in Command Prompt.
You can perform an indefinite search (where the full name of the parameter is unknown). In that, case the command will be-
dir /s < portion of the file name*>
This search will list out all the names of such files that have the same letters as you have asked in the command.
Like if you want to list out file names starting with “pic” so the command will look like this-
dir /s pic*
In the search results, you will see only the files that have a name starting with “pic“.
Sambit is a Mechanical Engineer By qualification who loves to write about Windows 10 and solutions to weirdest possible problems.