troubleshooting Question

Delete files based on NOT meeting criteria

Avatar of highwaterhead
highwaterhead asked on
Windows 2000
6 Comments1 Solution210 ViewsLast Modified:
Is it possible to delete a set of files if they do not match a file type criteria?

I have a folder on the network which is meant to hold word docs.
Someone on the network has been dumping other random rubbish in there.

If the rubbish was always MP3 files, then I could do a "del h:\*.mp3"

What I really want is something along the lines of "del NOT h:\*.doc *.*"

Is this possible? I would probably put it into a batch file to run at regular intervals.

Thanks in advance,

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros