paynea Posted November 20, 2002 Posted November 20, 2002 hello all, does anyone know of a class within the .net framework that allows me to test wether a specified file is open? cheers, drew. Quote
*Gurus* Derek Stone Posted November 20, 2002 *Gurus* Posted November 20, 2002 Try to open it using FileStream in a Try/Catch error block. If an exception is thrown you know the file is open (or non-existant). Quote Posting Guidelines
paynea Posted November 21, 2002 Author Posted November 21, 2002 cheers derek i ended up using the FileOpen method in exactly the same way, so i'm sure the file stream method works just as well. the only other factor i've come accross is the time it takes an app to load - put in a timer with a delay and then checks the open status of the file at set intervals... thanks alot, drew. Quote
*Gurus* Derek Stone Posted November 21, 2002 *Gurus* Posted November 21, 2002 In the future try not to use FileOpen. Read more here. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.