Send to a Friend

clodoveo's avatar

Regular expressions in windows shell to delete multiple files, is it possible?

Asked by clodoveo (78points) August 8th, 2009

I have an image gallery in my pc with about 2000 pics or more, organized in hundreds of directories and sub-directories, recently my system got a virus that created several junk files in almost every folder, I was able to clean the virus but most of these files remained in the folders.

Basically, what I need to do, is to delete everything that isn’t a jpg file and every file that isn’t called gallery.xml.

Is it possible to do this using something like rm command with regular expressions but in the windows shell? I’m on vista.
I would appreciate if you guys can also help me with the necessary regular expression, I learned a bit of that years ago using linux but i’m a little rusty right now, Thank you! ;-)

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.