Re: File test

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Adrian" <Adrian@xxxxxxxxxxxxxxxxxxxx> schrieb
Hi,
Before I open a file to read it etc how can I test to ensure it
not currently in use by another process?

No. If it was possible, it wouldn't make sense, because, between checking it
and, if finding out it is not in use anymore, and opening it, the file could
be opened again by another process.

the scenario is that I'm watch for a file to be created once it is I
read its contents and depending what they are I move it! however I'm
getting error when I'm am reading the file before its is fully
written ( the writing is slow as its over a WAN!) so I want to loop
until the file is fully created/ written.


Armin

.



Relevant Pages

  • Re: Image Load to SQL Server
    ... "Cor Ligthert" schrieb: ... Put your code into the loop and use 'File' instead of this variable. ... >> Specify the path in the call to 'GetFiles'. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: New production tubes - what to buy?
    ... The Milky Way schrieb: ... > CTFM wrote: ... >> Been out of the loop for a while and was just wondering what the best ...
    (alt.guitar.amps)
  • Re: Application.Exit() vs End
    ... "Michael D. Ober" schrieb: ... > In VB6, you can loop through the forms collection ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Programming
    ... "marlon" schrieb im Newsbeitrag ... > How could i loop through a a directory and import the contents of ...
    (microsoft.public.excel.programming)
  • Re: efficiency problem
    ... "Frank A. Adrian" writes: ... > This will move the computation out of the loop, ... -- John Fraser, comp.lang.lisp ...
    (comp.lang.lisp)