"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 tips!

DOS and Batch Files

Find All Files Of A Given Type

SUMMARY: Quicky scan your hard drive for all files with a given extension, such as batch files, text files, or executables.


 

Ever need to find all of your batch files on your hard drive? Or, need to find all of your text files? What about images? This quick batch file will let you type in the following command at the DOS prompt:

FINDALL BAT

And it will display all of your batch files in the current directory and subdirectories. Type:

FINDALL TXT

And it will display all of your text files in the current directory and subdirectories.

Just create a batch file called FINDALL.BAT, consisting of just this line:

@dir /b /s *.%1 | more

Place this file in your Windows directory, or if you are not using Windows, a directory inside your configurable PATH.

Want to sort the results? Make FINDALL.BAT consist of this line:

@dir /b /s *.%1 | sort | more



Print This Tip

Get E-Mail When New Tips are Online

Return to the DOS and Batch Files page.

 


New in MalekTips:

RSS Feeds- Subscribe!

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Get Tips!'.
 


( sample / details )
( opt-out instructions )