If you are using a Apache server on Win32, the log file will be LOCKED during its 
running.
So you cannot rename, unlink or open for edit on it. you can only open it for read 
only.
Maybe you can copy, I don't know.

rename ($file, $newfile) or die "...... $!"; # may help to see what's the problem.

Rgds,
Connie



> Hello Listers,
> 
> Could someone answer this for me please, I have written a script to rename a
> logfile (text file). I have used the rename function - but the documentation
> warns of issues depending on OS patform and then links to Win32:Copyfile and
> mentions having to unlink yourself.
> This is all fine, I can probably go this route without any serious problems,
> however I still don't know - why?
> What happens to a file when you use rename? Is it corrupted?
> All my tests with rename have not corrupted the logfile yet.
> 




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to