in reply to Help - Deleting a log line with a data older than 14 days

If this process takes place on an NT machine, and the file is hosted on a Win32 file system (NTFS or any FAT system), then you will have a problem if the program writing to the logfile has a lock on it, because under Windows, respecting a file lock is not a consentual activity but file locks are enforced by the operating system. So you might have to stop the log writing program, truncate the log, and then restart the log writing program again.

You might be lucky and the program maybe closes the file after each line written to it, so you could wait in a tight loop to move the file away if you get lock violations when opening the file.

  • Comment on Re: Help - Deleting a log line with a data older than 14 days