Deleting Files with a Pattern or Extension within a folderIf you wish to delete all files or a certain file within a folder and all subfolders,
1. simply go to Start -> Run -> “cmd.”
2. When the command prompt appears, go to the directory that you wish to delete from.
using cd command. For example
c:\>cd d:\kamal
3. Type in
D:\Kamal> DEL /F /S [*.type]
For example, if I wanted to delete all MP3 files from my PC, i would type
D:\Kamal> DEL /F /S *.mp3
All of the MP3 files on my D:\Kamal folder will be deleted.
Note that if you do not want to delete files within subfolders, don’t type the “/S.”