How do I delete a file that is in use by another process? [duplicate]

LockHunter is a foolproof file unlocker.

It is a tool to delete files blocked by something you do not know. LockHunter is useful for fighting against malware, and other programs that are blocking files without a reason. Unlike other similar tools it deletes files into the recycle bin so you may restore them if deleted by mistake.

Key Features

Shows processes locking a file or folder

Allows to unlock, delete, copy or rename a locked file

Allows to kill locking process

Allows to remove locking processes from hard drive

Integrates in to Explorer menu

It deletes files into the recycle bin, so you may restore them if deleted by mistake

Supports both 32 and 64bit Windows

as for your question:

Is there a way to find who / what's using the file?

alt text

LockHunter is freeware.


Unlocker is another cool app :)


If you want to find out who/what is using a particular file use Process Explorer


For remote machines, if the file is on a network share, you can access the domain controller/member server through computer management (Start->Run->compmgmt.msc) if you have the credentials.

Right-click on the top of the hierarchy (Computer Management (Local)), and select "Connect to another computer". Locate the appropriate server with the file and once connected, expand to Shared Folders -> Open Files. You can then right click any file and disconnect a user from it.

This method only works if you have access to the server. Locally, use the previously mentioned Unlocker.