Linked Questions
73 questions linked to/from How do I find out which process is locking a file using .NET?
10 votes
2 answers
3k views
How can I programatically determine which application is locking a file? [duplicate]
Possible Duplicate: How do I find out which process is locking a file using .NET? I want to copy a file but it is locked by another application, so a FileInUseException is thrown. I would like to ...
61 votes
0 answers
58k views
Using C#, how does one figure out what process locked a file? [duplicate]
In Windows, how do I determine (using C#) what process locked a file? Third-party tools are helpful, but not what I'm looking for.
15 votes
0 answers
30k views
Forcing closed an open file by C# [duplicate]
I found a similar question here but it was closed/accepted with an answer of "don't do that". I'm in a situation where I don't care what happens to the other applications, I want to take a file that ...
0 votes
1 answer
3k views
How do I close another process to release file locks? [duplicate]
I have created a button. In the event handler for the button I want to delete all the files in the folder (abc). Here is the code for this: private void button1_Click_1(object sender, EventArgs ...
2 votes
0 answers
4k views
Determine which process (b)locks a file, programmatically (under Windows >= XP) [duplicate]
How to programmatically determine from a process P, which other process P' has a lock on a file, that prevents P from recreating that file ? I know there are tools to do that, but how do they achieve ...
1 vote
2 answers
3k views
How to get the name of the process which locks a specfic file? [duplicate]
Possible Duplicates: How does one figure out what process locked a file using c#? How do I find out which process is locking a file using .NET? Hi, i try to get the name of the process wich ...
0 votes
1 answer
234 views
IOException was unhandled [duplicate]
I'm working with files on C#, my cose is supposed to delete some lines from a file as mentioned here: var tmpFile = Path.GetTempFileName(); var LinesToKeep = File.ReadLines(path).Where(l => l....
1 vote
0 answers
113 views
Process that access a file in C# [duplicate]
Possible Duplicate: How do I find out which process is locking a file using .NET? I wanna to know which process access to specific file that i chosen. Can any one introduce me a way of ...
3 votes
0 answers
44 views
Get application that is using a given file [duplicate]
How can I get in C# the application that is using a given file ? To be more precise, if the app I am developing wants to overwrite a file that is being used by another application, I would like to ...
283 votes
12 answers
1.0m views
IOException: The process cannot access the file 'file path' because it is being used by another process
I have some code and when it executes, it throws a IOException, saying that The process cannot access the file 'filename' because it is being used by another process What does this mean, and ...
58 votes
9 answers
58k views
How do I delete a file which is locked by another process in C#?
I'm looking for a way to delete a file which is locked by another process using C#. I suspect the method must be able to find which process is locking the file (perhaps by tracking the handles, ...
24 votes
10 answers
50k views
The process cannot access the file because it is being used by another process
I have a set of nightly reports. Sometimes I get the exception: The process cannot access the file because it is being used by another process How do I tell what process is holding on to the file?...
12 votes
3 answers
10k views
What does this do? tasklist /m "mscor*"
Saw this question here : What Great .NET Developers Ought To Know (More .NET Interview Questions)
7 votes
2 answers
22k views
How to kill a C# process?
I am building a C# program that unzips a file, and work on this file. Sometimes I get this message: "the process cannot access the file c:.... because it is being used by another process" What I can ...
11 votes
3 answers
4k views
TeamCity NuGet Installer step fails
This error occurs sometimes, usually this step works fine, but in about 10% cases it fails with below message. Nuget installer step is first build step, and also "clean checkout" is enabled ...