Results 1 to 3 of 3
Thread: W2K Automated File Retention
2002-04-22, 20:38 #1
- Join Date
- Apr 2002
- 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.
2002-04-23, 02:19 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- 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>
2002-04-23, 07:28 #3