Dear Perl experts,
I have the following requirement which can be done in Perl/VB script whichever 
is smarted to do. I am new to perl and am sure i will learn a lot by your 
valuable hints .
requirements are 
- the log file should be deleted if the files are older than 400 days
- the log files from the server should be kept in the backup folder for 185 
days.
Script should check the following:
1. Check if a file c:\\emailmoniroing\\logs\EmailLogyymmdd.log exists where 
‘yymmdd’ denotes today’s date If it does not, create a new file. 
2. For each file in the ‘c:\\emailmonitor\main’ folder, check file size.
3. If file size=0, then move the file from the 'c:\\Emailmonitoring\main' 
folder to the ‘ c:\\emailmonitoring\backup’ folder
4. If file size >0, then read/append contents of the file to 
c:\emailmonitor\logs\EmailLogyymmdd.log. Move the file read from the 
'c:\\Emailmonitoring\main' folder to the ‘ c:\\emailmonitoring\backup’ folder
5. Delete all files older than 'x'' months from the c:\\emailmonitoring\backup 
folder
6. Delete all EmailLogyymmdd.log files older than ‘x’ months from the folder 
‘c:\\emailmonitoring\Logs’
 
Finally,
Set up a windows scheduler task to run the new script every 20 minutes or it 
can run continuously, sleep and wake up every 5 minutes
 
Could you provide any sample script something to acheive the above. it will be 
very useful to meet our business needs. 
 
Thanks in advance
regards
mani


      See the Web's breaking stories, chosen by people like you. Check out 
Yahoo! Buzz. http://in.buzz.yahoo.com/
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to