finding which process locks a file

  • Thread starter Thread starter Shamresh
  • Start date Start date
S

Shamresh

Hi to all,

I have a file that is locked and I get the message "file is locked by
another user or process". How can I show which process has it locked (i.e.
need the pid and the process name and path).

Sham.
 
Any clues? I posted this over a week ago and was hoping there was an easy
solution.

Sham.
 
Any clues? I posted this over a week ago and was hoping there was an easy
solution.

There is no easy solution. If you use Google to search this newsgroup for
previous questions identical to yours, you'll find some not-so-easy
solutions.

Basically, this is not information you can get via .NET. It's not even
all that easy to get from the native Windows API.

Pete
 
There is no easy solution. If you use Google to search this newsgroup for
previous questions identical to yours, you'll find some not-so-easy
solutions.

Basically, this is not information you can get via .NET. It's not even
all that easy to get from the native Windows API.

Pete

Try using FileMonitor utility to check which process accessed the file
http://www.microsoft.com/technet/sysinternals/FileAndDisk/Filemon.mspx
Don't have any other idea. I've faced some problem while using IO
streams. Usually this happens when you opened a stream and it was not
closed/disposed properly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top