Home » Questions » Computers [ Ask a new question ]

Windows 7: File In Use when deleting file [duplicate]

Windows 7: File In Use when deleting file [duplicate]

Trying to delete a file, and I get an error saying that the file is in use. I've tried to look for it in the Resource Monitor (Disk), but cannot find it there.

Asked by: Guest | Views: 31
Total answers/comments: 2
Guest [Entry]

LockHunter can be a solution, it's freeware and works like Unlocker, which is another nice tool.
Guest [Entry]

"Open an administrator command prompt by typing cmd into the start menu search box, and hit the Ctrl+Shift+Enter key combination.

To take ownership of the file, you’ll need to use the takeown command. Here’s an example:

takeown /f C:\Windows\System32\en-US\winload.exe.mui

That will give you ownership of the file, but you still have no rights to delete it. Now you can run the cacls command to give yourself full control rights to the file:

cacls C:\Windows\System32\en-US\winload.exe.mui /G geek:F

(e.g) Note that my username is geek, so you will substitute your username there.

At this point, you should be able to delete the file. If you still can’t do so, you may need to reboot into Safe Mode and try it again. For the filename in the example, I was able to overwrite it without safe mode, but your mileage may vary.

(source)"