How can I unlock a folder locked by ‘System’ process on Windows Server 2008?

I'm on Windows Server 2008 64-bit. LockHunter identifies that a folder is locked by the "System" process. I'm not sure why this happens, but my bigger concern is how to unlock it. I'm looking for a solution that can be run from the command line.

LockHunter itself is unable to unlock it. Also, Sysinternals' Process Explorer doesn't find the locked folder's handle. Rebooting is not an option either.

alt text


It turns out this was caused by another computer that had an open explorer shell on the "problematic" computer. This problem persisted even after a reboot! (not at first, but it reappeared)

The only solution was to close the relevant explorer window from the other computer.


usually it is because the file is open via file sharing. You can close that in computer management GUI / Shared folders / Open Files or via command line

net file - lists all open files

net file id /close

UPDATE: this command might work better in some cases:

openfiles /query /fo csv /v > c:\temp\files.csv -then open files.csv and search in it-


If nothing else works, you may need to schedule an outage to reboot into safe mode and delete the file.