Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script that would delete all mp3 files in the folders

Status
Not open for further replies.

savvyuser

Technical User
Apr 26, 2004
50
PH
Guys,

Does anyone knows here how to build a script that would delete all mp3 files in the folders. Folders here are not given but files are stored in C & D drive. However, user doesn't know where it stored. Then, it counts how many mp3 files are deleted.

Thanks....
 
A simple bat file for cmd.exe:
del /s *.mp3

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks for suggesting. However, that doesn't resolve the purpose, because the folder is not given. No destination directory. Is there a script that would scan all folders in the drive no matter how many folders that you have in your drive as long the script finds .mp3 it will be deleted.

Thanks....
 
You don't need to know the folder(s) name:
del /s c:\*.mp3
will scan all the directory tree of the C: drive much faster than any script you can write...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top