Feb 14

DOS Batch Script to Delete Files in a Directory older than x Days

Tag: .netpop @ 10:18 pm

Here’s a clever little batch script I found at work, by setting a few parameters near the top of the file, you can run this batch file whenever, to clean up a directory.

Typical usage would be to delete all .dmp files in a given directory which are older than 30 days.

I’m not sure who originally wrote this, but its cool!

DelOld.txt

One Response to “DOS Batch Script to Delete Files in a Directory older than x Days”

  1. BATMAN says:

    You saved me LOTS of time, I’ve been looking for a “vanilla” code for a long time. When will people understand, the solution is not to install more code!

Leave a Reply