Please help us write a batch file that automatically renames the SD server log once it reaches 10 MB....
How do i check the file size?
If i am not wrong the code to rename the file is:
@ echo off NET STOP "hp OpenView service desk 4.5 server" for /F "tokens=1-4 delims=/ " %%A in ('echo %date%') do rename logserver.txt logserver%%B%%C%%D.txt NET START "hp OpenView service desk 4.5 server"
Thanks in advance..
OS: Windows server 2003 SD version: 4.5 Service Pack 21
another way of looking at it is to save the script as a batch file and use the op sys scheduler to run it either, every day or week to ensure that it is kept to a reasonable size. I think that is easier that trying to trigger it to run on file size and and least you will be expecting it to run on a certain day and certain time so you can check from time to time that it is running.