Re: reading a opened file



On Fri, 23 Sep 2005 21:43:17 +0200, "Maarten Wiltink"
<maarten@xxxxxxxxxxxxxxxxxx> wrote:

>"snide" <nospam@work> wrote in message
>news:43341e86$0$10537$4d4eb98e@xxxxxxxxxxxxxxxxxxxxxx
>
>> In fact I woudn't copy the file while it is in a "transitional" state.
>> the data it contains are not complete, so the copy can't be used.
>> So how to know that the file is opened for writing ?

>Open it with file mode fmShareDenyWrite, see if it works?

Yes, that was my initial thought
- the trouble is, that it will cause the other App to throw an error
if it tries to do its thing
- it might not know how to handle such a situation

Also it is possible that the other App is sensible and closes the file
after writes and then reopens it in order to guarantee flushing.

We really need to know more about the other App
.



Relevant Pages

  • Re: Display contents of text file in the Browser
    ... It sounds like your app is attempting to read from the file at the same time ... that it is writing to it, ... process and attempting to read the file and display it at the same time. ... memory, and return that string to the client, while launching a separate ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Writing to eventlog
    ... > of it is writing to log informations from which table it was readed. ... If your app is running on an intranet server that you or your company ... domain user account and tell your app run under that account. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: What can .Net do for me?
    ... > The same app takes less code. ... That is a ridiculous statement, when it come to writing less code for ... Prev by Date: ...
    (borland.public.delphi.non-technical)
  • Re: Question about Namespaces
    ... I was actually writing this app in VB.net. ... I figured the C# newsgroups would be better to post to about namespaces ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Making a library
    ... I'm writing a C++ app for my final year project at ... >University and what I'm wanting to do is produce a library (or ... Prev by Date: ...
    (microsoft.public.vc.language)