Sign in with
Sign up | Sign in
Your question

Batch file to delete files with 'if' statement

Tags:
  • Windows 7
  • MP3
  • If Statement
August 21, 2014 8:50:06 AM

Hello, I've been trying & error-ing on this with no luck. Can someone post the correct thread for a batch file to:
Look in the Source directory at all folders & subfolders & delete any .jpg file with the SAME name as the subfolder it is in?
For example:
C:\User\Desktop\Music is the source directory with Subfolder 'Michael Jackson' in it. In that folder there is a subfolder named 'Thriller'.
In the Thriller folder the files are song1.mp3, song2.mp3, thriller.jpg, cover.jpg.

I would like the batch file to delete ONLY the thriller.jpg from the folder.
thanks!

More about : batch file delete files statement

!