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?
1.) Open `computer management', (right-click "My Computer", select `Manage') 2.) Scroll down to `Shared Folders', expand. 3.) Select/click on `Open Files'. Double/triple-check to make sure nobody has it open.
If you're good on the above, a too-deep file/folder path might be giving you some grief. Try navigating several folders towards the root, then cutting and pasting them to reduce some of that path. Alternately, you could rename the folders in the path to "1", "2", "3", etc. Cutting down on some of the extraneous characters.
SysInternals has a tool called MoveFile that will do move or delete the file upon reboot of the machine.
I see this all the time, you can also run Systernal's Process Explorer to find who has the file, here's a great how-to on using Process Explorer for this purpose: Unlocking files that are in use
I personally like this way since I have this tool on my USB drive and can run it without having to install it.
A few methods are here: http://www.geeksaresexy.net/2007/06/04/how-to-delete-an-undeletable-file/