Re: Find out if other process is accessing a file?



If you attempt to open the file and get an exception, another process is
using it. Use a try/catch block.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Carl" <carlz@xxxxxxxxxxxxxxxx> wrote in message
news:OWrdWsTdHHA.4616@xxxxxxxxxxxxxxxxxxxxxxx
Hi

Is it possible to find out if another process is using a paticular file
(xml)? There does not seem to be anything useful in the File och
Filestream class for this purpose.

regards

Carl



.



Relevant Pages

  • Re: Cancel windows message from reaching parent
    ... Kevin Spencer ... FTP Client Classes, Enhanced Data Controls, much more. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Event Handler help
    ... Kevin Spencer ... FTP Client Classes, Enhanced Data Controls, much more. ... DSI PrintManager, Miradyne Component Libraries:http://www.miradyne.net ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: error while using SmtpMail to send a simple html formatted mes
    ... FTP Client Classes, Enhanced Data Controls, much more. ... DSI PrintManager, Miradyne Component Libraries: ... "Kevin Spencer" wrote: ... But my need is to send a HTML formatted message. ...
    (microsoft.public.dotnet.framework)
  • Re: Making a copy of session objects
    ... FTP Client Classes, Enhanced Data Controls, much more. ... So now this session have values of reference ... "Kevin Spencer" wrote: ... assign a class to a variable, you are assigning a reference to the class. ...
    (microsoft.public.dotnet.framework)
  • Re: Button with arrowdown (acting as a combobox)
    ... In that case, create a button that has an arrow on it, and put it next to ... Kevin Spencer ... FTP Client Classes, Enhanced Data Controls, much more. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)

Loading