File cannot be deleted because it is in use

G

Guest

Often, when trying to delete a file, I get an error message telling me that I
cannot delete the file because it is currently in use.

How do I find out what is the name and ID of the process holding an open
handle to the file?

And sometimes you have a process you want to kill, but you get a message
that the process cannot be killed. This is often due to a service that runs,
how do you find out which service the process belongs to?
 
T

Torgeir Bakken \(MVP\)

blacksheep1666 said:
Often, when trying to delete a file, I get an error message telling me that I
cannot delete the file because it is currently in use.

How do I find out what is the name and ID of the process holding an open
handle to the file?

And sometimes you have a process you want to kill, but you get a message
that the process cannot be killed. This is often due to a service that runs,
how do you find out which service the process belongs to?
Hi,

Download Process Explorer from SysInternals (task manager on
steroids) and select "Find Handle..." under Find (or just use
the keyboard shortcut Ctrl+F). Fill in the file name.

http://www.sysinternals.com
 
G

Guest

Is there not a dos command for this?
A command to get the process ID of the process with an open handle to the
file.
 

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

Top