Windows search can find almost anything on your computer’s hard drive. If you like the feature, you can expand it to include other drives on your computer. If you discover that Windows search isn’t as effective as you’d like, you can install additional apps/utilities or use Command Prompt to search for files and folders. Here’s how to do it.
From the Command Prompt, look for files and directories.
Command Prompt can look for files and folders on a specified disc or in a specific folder. It opens to your user folder by default, presuming you’re running it with regular user permissions, and you may or may not want to search that folder. This is why you’ll need to learn how to relocate Command Prompt.
You must first switch to it with the following command if you want to search other non-window drives:
Syntax
drive_letter:
Example
D:
Use the command below to relocate to a different folder. The quote marks are only required if the path you’re entering contains folders with spaces in their names, but it’s wise to create a habit of doing so.
Syntax
cd “path-to-folder”
Example
cd “D:\Images
Look for files based on their type.
You can use the following command to search the current folder for all files of a specific type.
Syntax
dir /b/s *.file_extension
Example
dir /b/s *.png
The programme above will search the current directory and its subfolders for all PNG files. The /s switch instructs the command to include subfolders, whereas the /b switch displays files without metadata, making the list easier to read.
Look for files by their names.
Use the following command to look for files by name:
Syntax
dir *file_name*.* /s
Example
dir *arrow*.* /s
The command above will check for all files that have the same name as the one you specified, regardless of file type. Enter the file extension after the period to filter the search down by file type.
Example
dir *arrow*.jpg /s
Look for folders.
Use the following command to look for subfolders in a folder:
Syntax
dir “Name of folder to search” /AD /b /s
Example
dir Images /AD /b /s
Remember that the programme above will look for subdirectories in the folder you specify. If you want to search a different folder, then use the cd command to navigate to the folder, then run the command.
Look for a folder with an unfamiliar name.
You can use the following command if you’re not sure what a folder’s name is.
Syntax
dir /s/b /A:D “D:*partial-name-of-folder*”
Example
dir /s/b /A:D “D:*Stea*”
What do you think?