Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Delete based on dates

Jul
304
0
How would I set up a batch file that would delete all files / folders older than, say, two days?

I use ERUNT as a registry backup, but, because I append the time to the end of the folder name, AUTOBACK cannot do the delete on any older than "x."

As of right now ERUNT is set up to create folders in the following format:

dd_mm_yy, hh:mm:ss

Is there a way to have TCC do this? Would it use the timestamp instead of the name?

Regards,
Chuck Billow
 
See HELP DATERANGES for information on, well, date ranges.

And also note that DEL supports a handy /N option, which means "don't really delete". You can test your command using /N and, once you're sure it's working as you expect, remove the /N to actually do the dirty deed.
 
Charles, I know I'm doing something wrong that should be obvious, but...

I tried using the dir command, like dir /[d-3,1980-1-1] and dir /[d-3]

but in both cases I got listings for all the files in the folder -- even today's.

Sigh...

Chuck
 
Charles, I know I'm doing something wrong that should be obvious, but...

I tried using the dir command, like dir /[d-3,1980-1-1] and dir /[d-3]

but in both cases I got listings for all the files in the folder -- even today's.

Both work as expected for me. You don't by any chance have an alias for DIR, do you?
 

Similar threads

Back
Top