1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Date sensitive deleting

Discussion in 'Windows XP' started by euphjazz, 2006/05/29.

  1. 2006/05/29
    euphjazz

    euphjazz Inactive Thread Starter

    Joined:
    2005/02/15
    Messages:
    7
    Likes Received:
    0
    Can anyone help me write a batch file that will delete files with dates older than 1 week earlier than today's date.
    I know you can get today's date from the DATE command, but how can I subtract 7 days and use that date as a switch in my ERASE command?
     
  2. 2006/05/29
    rsinfo

    rsinfo SuperGeek Alumni

    Joined:
    2005/12/25
    Messages:
    4,076
    Likes Received:
    178
    Interesting.

    I don't think it can be done only by using DOS's inbuilt commands, we may have to search for a utility to get the difference between current date & the target date and write it to a file, another erase utility which woud take this file as an input & do the job for you. Simple.:D
     

  3. to hide this advert.

  4. 2006/05/29
    SpywareDr

    SpywareDr SuperGeek WindowsBBS Team Member

    Joined:
    2005/12/31
    Messages:
    3,752
    Likes Received:
    338
  5. 2006/05/29
    euphjazz

    euphjazz Inactive Thread Starter

    Joined:
    2005/02/15
    Messages:
    7
    Likes Received:
    0
    Thanks for the suggestions
     
  6. 2006/05/31
    SpywareDr

    SpywareDr SuperGeek WindowsBBS Team Member

    Joined:
    2005/12/31
    Messages:
    3,752
    Likes Received:
    338
  7. 2006/05/31
    euphjazz

    euphjazz Inactive Thread Starter

    Joined:
    2005/02/15
    Messages:
    7
    Likes Received:
    0

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.