|
-
May 29th, 2012, 05:35 PM
#1
How to check if a file is in use by other App in C#?
If a file is in use, is there any way to close the file so that the file can be opened by current App? Thanks.
-
May 30th, 2012, 03:05 AM
#2
Re: How to check if a file is in use by other App in C#?
My idea would be to 1st find who has the handle on the file.
And then to kill the process.
However that's harsh as killing a process leads to unexpected results like the file being corrupted. Furthermore if a file had a handle preventing from opening there should be a reason that no other access it.
-
May 30th, 2012, 03:35 PM
#3
Re: How to check if a file is in use by other App in C#?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|