Posted: 07 Mar 2011 21:44 | ||
Registered User Currently Offline |
Posts: 2 Join Date: Mar 2011 |
|
For anyone interested in rolling over their log files daily instead of by size, I've come up with a way to do so. My script stops the Sysax Multi Server Service, waits 10 seconds, copies the log file from one location to another while also adding the date to the beginning of the filename, clears the contents of the log, then starts the Sysax Multi Server Service.
My script contains the following: net stop "Sysax Multi Server Service" choice /c:@ /n /t:@,10 copy e:\Sysax_SFTP_Logs\sysaxservd.log e:\Sysax_SFTP_Logs\Archive\%date:~4,2%-%date:~7,2%-%date:~12,2%_sysaxservd.log echo. > e:\sysax_sftp_logs\sysaxservd.log net start "Sysax Multi Server Service" |
Posted: 22 Jul 2011 05:04 | ||
Registered User Currently Offline |
Posts: 7 Join Date: Aug 2009 |
|
Thanks |