Results 1 to 9 of 9
  1. #1
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Batch File to Delete

    Can anyone tell me how to program a batch file that will delete files older than.......say 30 days? I have Iomega AutoBackup that does a wonderful job of backing up my data, but after awhile I have huge backup files and need to delete some.

    <img src=/S/help.gif border=0 alt=help width=23 height=15>

  2. #2
    Uranium Lounger viking33's Avatar
    Join Date
    Jun 2002
    Location
    Cape Cod, Massachusetts, USA
    Posts
    6,308
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Batch File to Delete

    You will have to wait for our resident Batch file expert, John Gray to spot this thread. If anyone can help you, it will be John.
    BOB
    http://lounge.windowssecrets.com/S/flags/USA.gif http://lounge.windowssecrets.com/S/f...sachusetts.gif


    Long ago, there was a time when men cursed and beat on the ground with sticks. It was called witchcraft.
    Today it is called golf!

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Batch File to Delete

    Hi There

    While we wait for John have a look here:

    Delaged

    Code near the bottom seems to do something
    Jerry

  4. #4
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Batch File to Delete

    Whoa! That will take more than a look!

  5. #5
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Batch File to Delete

    Mr. Gray's already weighed in on this one. See <!post=this thread,400,092>this thread<!/post>.

  6. #6
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch File to Delete

    > Code near the bottom seems to do something

    That's wonderful. Thanks for the insight... <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>

  7. #7
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Batch File to Delete

    Hi,

    Assuming you've got the Windows Scripting Host installed, the solution here:
    http://www.protean-inc.com/PurgeFiles VBS.pdf
    or here:
    http://cwashington.netreach.net/depo/view....ptType=vbscript
    might be just the ticket.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  8. #8
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Batch File to Delete

    Thanks for this post. It looks like what I need, if I can wade through it all.

  9. #9
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Batch File to Delete

    I just wanted to note that, for any fellow scripting newbie looking for "sample scripts" to learn by, macropod's 2nd link is a particularly good one. Who knew scripts took named arguments?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •