Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Apr 2002
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    W2K Automated File Retention

    I need an automated way to delete log files that are over 90 days old. Trying to set up a script or batch file to control log file retention. I was surprised that I could not find a utility or resource kit tool to achieve this.
    Robocopy does have the ability to copy based on the age of the file but it would be a primitive solution (Robocopy to new folder, delete orig folder, rename new folder to orig folder name). Any assistance would be greatly appreciated.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: W2K Automated File Retention

    Although I never tried it before, W2K has a cool task scheduling wizard (Start > Programs > Accessories > System Tools > Scheduled Tasks folder > Add Scheduled Task). I think it can run a batch file as easily as an EXE.

    Your batch file can use VBScript, or I should say, you could have your scheduled task be a VBScript program. To check file dates in VBScript you instantiate the FileSystemObject. Hopefully there are some helpful examples in the Lounge to get you going. If not, another request probably would bring some forth. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  3. #3
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: W2K Automated File Retention

    Check out DelOld - free software that deletes files older than a certain number of days.

Posting Permissions

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