Delete only image files from a folder and sub folders

liquid_dreams

Honorable
Apr 1, 2013
5
0
10,510
Hi guys

I've searched all over for this but whether I've searched hard enough is another question! :pt1cable:

I want to delete all the images related to my flac files so I can sort out my album art. I have removed all images from tags using a mediamonkey plugin but I also want to remove all image files in the album directories, but I can't figure out how to do it in one quick search! i have 1500 albums so going through each sub folder would take hours.

Thanks for any help.
 
Solution
If they files have a pattern in the file name (i.e. *.jpg, or image00*.jpg, where * is the wildcard), there is an easy way to do this.

del /s image_file00*.jpg (the /s tells you to delete all files in sub folders that contain the files)

It won't delete empty sub directories, so using "xcopy dirA dirB /S" copies all folders and files except empty folders. So try this:

c:\users\my pictures\xcopy myAlbums myAlbumsSAV /S - after completion, do a second xcopy, but reverse the folder names.
If they files have a pattern in the file name (i.e. *.jpg, or image00*.jpg, where * is the wildcard), there is an easy way to do this.

del /s image_file00*.jpg (the /s tells you to delete all files in sub folders that contain the files)

It won't delete empty sub directories, so using "xcopy dirA dirB /S" copies all folders and files except empty folders. So try this:

c:\users\my pictures\xcopy myAlbums myAlbumsSAV /S - after completion, do a second xcopy, but reverse the folder names.
 
Solution