Normally with log files you rotate them rather than delete records.

Pick a period (hourly, daily) and when it is triggered MOVE the file to a new name - keep a few generations.

The only tricky thing is that the process writing to the file needs to understand what is happening when the file moves. You may need to stop the process, move the file and then re-start the process.

For example, assuming your file is called "mylogfile.txt" and you want to keep a weeks worth then at midnight each day you would do the following in a batch file:
Code:
move mylogfile.006 mylogfile.007
move mylogfile.005 mylogfile.006
move mylogfile.004 mylogfile.005
move mylogfile.003 mylogfile.004
move mylogfile.002 mylogfile.003
move mylogfile.001 mylogfile.001
move mylogfile.txt mylogfile.001