Delete Locked File in Windows – How to Remove Stubborn Files

fileswindowswindows-server-2003

I'm moving some files around on the server (Windows Server 2003), and there's a locked file that no one seems to have open. How do I delete this file?

Best Answer

Use the openfiles command to identify and disconnect users who have the file open. If that doesn't work, download the Unlocker utility.

Openfiles syntax:

openfiles.exe /query
openfiles.exe /disconnect /id openFileID