Home All Groups Group Topic Archive Search About

Know the process that use a file

Author
25 Jul 2006 7:17 PM
paraidy
Hi Guys, i would to know if a file is used by a process, and what is
the process that use the file, how can i do this in VB.net?
thanks :)

Author
25 Jul 2006 7:51 PM
iwdu15
i think the only way to do it is to try and access the file inside a Try
Catch block and if an error is thrown the file is being used....
--
-iwdu15
Author
25 Jul 2006 7:54 PM
Michel Posseth [MCP]
>i think the only way to do it is to try and access the file inside a Try
> Catch block and if an error is thrown the file is being used....


And then you still  not know wich process is using the file :-)

Michel




Show quoteHide quote
"iwdu15" <jmmgoalsteratyahoodotcom> schreef in bericht
news:75728978-F2A9-4F94-892D-B702ADD6A9DA@microsoft.com...
>i think the only way to do it is to try and access the file inside a Try
> Catch block and if an error is thrown the file is being used....
> --
> -iwdu15
Author
25 Jul 2006 8:50 PM
iwdu15
yea...this is tru....my bad...il work on that for you
--
-iwdu15