Search files with same extension in Command Prompt
Here is a trick to search files with similar extensions(say .txt) under a particular directory using Command Prompt.
Follow these steps:
(You can use any extension for example for image files try *.jpg instead of *.txt
- Start → Run → type cmd → OK, you will see the following screen.
- Go to the directory where you want to search files here the directory is F: drive, now type:
dir *.txt /s /b > TextFiles.txt
This command line will create a file called TextFiles.txt. This file will have a list of all the files in that directory and all subdirectories with the .txt extension. You can then open up this file in any text editor and operate on it. and also By changing the txt part, you can select different files. For example, if you wanted to list all of the PDF documents, just type:
dir *.pdf /s /b > PDFFiles.txt
and ImageFiles.txt intstead of TextFiles.txt)
Leave your Comments....
0 comments »
Leave your response!