Reputation: 11665
I need to delete a file programmatically even if the file is locked. I get a locked state and I can't figure out, which process it locks. It is no system file, but my own created file. It is still locked, after closing all my applications.
How?
Upvotes: 0
Views: 197
Reputation: 1082
If the "Process Explorer method" didn't help, try:
If none of them works, you'll probabely not be able to delete the file/folder. You can then use LockHunter (http://lockhunter.com/) to automatically delete it after reboot.
Upvotes: 1
Reputation: 1803
You can use "process explorer" to find the process that locks it.
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
Open process explorer click the binocular icon and search the file name.
Upvotes: 0