in reply to (tye)Re: Unable to write to a file opened in read only mode
in thread Unable to write to a file opened in read only mode

Thanks for taking the effort to try it. My version of notepad and gvim must be using the "no sharing" option. I have tried it on nt workstation and server with the same locking problems. I'm not sure how it is working for you.

If I understand you correctly, your saying it depends on how the application is opening the file for writes. This will determine if it can write to the file or not. So...If the app writing to a log file doesn't allow anyone to be reading the file, I'm out of luck right?

It sounds like the solution might be for me to not open the file at all. I guess I can create a temp file and save my last position read each time I create and read the temp file. Based on the position, I can read only the new lines that have been added.

I think this will work, but it is not as clean as the original solution.

Thanks.

  • Comment on Re: (tye)Re: Unable to write to a file opened in read only mode