Batch to delete jpgs

Microsoft Windows 7 home premium
June 9, 2010 at 10:05:22
Specs: Windows 7 Ultimate x64 , 4 GB
I need a batch script to traverse a given directory, and delete each JPG, as long as the filename is not folder.jpg.

Here's an example:

G:\Media\Movies\The Wolfman
--The Wolfman.mkv
--folder.jpg
--The Wolfman.dvdid.xml
--asdfni443fa.jpg

What I need is asdfni443fa.jpg deleted, but not folder.jpg.

If you need anymore information let me know.

Thanks,

Tony


See More: Batch to delete jpgs

Report •

#1
June 9, 2010 at 11:21:14
deleted post, i gave wrong information.
use Razor's code!

Report •

#2
June 9, 2010 at 11:23:42
Untested:
attrib +h folder.jpg /s
del *.jpg /s
attrib -h folder.jpg /s


Report •

#3
June 9, 2010 at 11:54:42
Worked perfectly Razor.

Thanks a lot.

Tony


Report •
Related Solutions


Ask Question