How to unlock files using handle.exe and process name?

Posted by Radek on Super User See other posts from Super User or by Radek
Published on 2012-10-12T02:12:25Z Indexed on 2012/10/12 3:39 UTC
Read the original article Hit count: 321

Filed under:
|

I tried Unlocker 1.9.1 but it doesn't work correctly for me on Windows7 (worked ok on Windows XP) and also I tried LockHunter 2.0.2.103 x64 and reported a bug but .... LockHunter actually unlocks the file from GUI but not from command line.

So I want to use handle.exe by SysInternals to unlock one file "TestPro.log". I know the absolut path if it helps. I can list and all processes that locked the file by executing

C:\Windows\system32>c:\edutester\progs\handle testpro.log
java.exe           pid: 2120   type: File           338: C:\Users\Public\TestPro
\TestPro Automation Framework\Logs\TestPro.log
java.exe           pid: 1004   type: File           934: C:\Users\Public\TestPro
\TestPro Automation Framework\Logs\TestPro.log

What I need to know how to unlock the file using above info from command line automatically. No user intervention is possible.

  • Windows 7 64bit
  • Microsoft Windows [Version 6.1.7601]

© Super User or respective owner

Related posts about windows-7

Related posts about sysinternals