Tom Sage
asked on
VB.NET - How to determine if a file is in use?
I can test if a file exists by using System.IO.File.Exists(file name), but how can I test for:
1) a file in use?
2) username using the file?
Thank you.
1) a file in use?
2) username using the file?
Thank you.
1. Try to open the file in Append mode.
ASKER
Would you give me a short example please?
Thanks
Thanks
ASKER
Eric,
Thanks for your response.
I was wondering if .NET had the ability to report on a file in use and who is using it without having to create an exception to get the information. If not, then we will get it from the exception.
Thank you
Thanks for your response.
I was wondering if .NET had the ability to report on a file in use and who is using it without having to create an exception to get the information. If not, then we will get it from the exception.
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Eric, thanks for your prompt response. Too bad .NET doesnt supply this without having to create an exception.