1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Delete based on dates

Discussion in 'Support' started by CWBillow, Feb 19, 2013.

  1. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    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
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    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.
     
  3. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    0
    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
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    Both work as expected for me. You don't by any chance have an alias for DIR, do you?
     
  5. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    0
    I had an alias for d but I had removed it. Oh well...

    Thanks anyway, Charles.

    Chuck
     
  6. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    0
    Charles, I THINK I found my mistake...I'll let you know.

    Regards,
    Chuck
     

Share This Page