In this post we will see how to search for a specific file type across the drive (to demonstrate this D: Drive is used as an example and file type “.bak” backup file).
-
First method is a direct one which many prefer to use. Go to the respective drive, in the search box type the file extension (.bak) and hit enter.
Here is the list of backup (.bak) files in D: Drive |
-
Second option is to search through command prompt. Open
command prompt (“Windows Key + R” or “Start->All
programs->Accessories->Command Prompt”), by default it’s pointed towards
C: drive. To change the location, just type the required drive letter (D:). Now run
the below command to get the list of “.bak” files in D: Drives
dir /b /s *.bak
Command line output for the list of backup files |
Note: It’s not mandatory to move to the respective drive and search. The same search can be done from C: Drive itself. We just have to pass the location in the command. You can run the below command from any drive to get the list of “.Bak” files in D: drive.
dir /b /s D:\*.bak
Hope now you got the logic behind this search :-) It’s not
over, there is one option to do the search.
-
Third option is using “Windows PowerShell”. As the name says, Yes it’s a powerful tool to work. Open PowerShell (Start->All programs->Accessories->Windows PowerShell-> Windows PowerShell) and run the below command to list all the “.bak” files available in D: drive.
Not satisfied with the above output format?
Let’s go and customize it. This time we will filter the required data, say we have a requirement to fetch only file name and directory details. Here we go, run the below command
Hope you find this information useful. Please do share your thoughts and also
let me know if you have any other options to do this :-)
Cheers,
Naveen
No comments:
Post a Comment
Please share your thoughts