Free appliaction to delete locked file/directory on windows?

sometime file or directory are locked( which does not have a hidden/system attribute) so that we can’t delete it easily. Is there any free software can kill this kind of file or directory? If it can be run as a command line software, it could be better.
Thanks

I found that the simplest way to sort this was boot to Linux from a live boot usb.

If you don’t like the CLI and need a GUI then Ubuntu https://ubuntu.com/index_kylin or if your woes are more hardcore then Kali Linux https://www.kali.org.

If not, then any of these http://www.linuxandubuntu.com/home/top-5-linux-system-rescue-cds. You should be able to get rid of any stubborn files and fix whatever ails your Windows install…

The “locked” attribute is intended to function like the safety on a gun – to prevent an unwanted misfire by making it a two-step process. (I don’t recall if the delete-file command in Windows has a “force” option …)

But modern versions of Windows also have a fully-developed policy based security model with the concept of file ownership and security/access rules. This keeps you from deleting “someone else’s” files, or files that belong to the operating system, and so on. The owner of the file, and/or system administrators, determine what you can and cannot do.

P.S.: The presence of this security model is also a reason why you should never run your system as an “Administrator.” Practice the Principle of Least Privilege. The foot you save will be your own.

Yesterday I had to kill a stubborn Windows process to be able to delete a file. I used the free Autoruns tool to fix the problem.

after some download-test, finnally I use http://www.wisecleaner.com/wise-force-deleter.html