I am trying to close a handle to a locked file in Windows, using Sysinternals Handle software (http://technet.microsoft.com/en-us/sysinternals/bb896655).
First I search for opened handle:
handle.exe "C:\Temp"
It issues me the following:
Far.exe pid: 1144 type: File 2E8: C:\Temp
Far.exe pid: 1144 type: File 3A8: C:\Temp
Next I run handle.exe with -c parameter. However, whichever number I enter, it does not do anything. I have tried both: 1144, 2E8, 3A8 and 1144 in hex (478) as the software help says it accepts PID in hexademic. Whatever I enter, it just issues the following:
Handle v3.46
Copyright (C) 1997-2011 Mark Russinovich
Sysinternals - www.sysinternals.com
usage: handle [[-a [-l]] [-u] | [-c <handle> [-y]] | [-s]] [-p <process>|<pid>] [name]
-a Dump all handle information.
-l Just show pagefile-backed section handles.
-c Closes the specified handle (interpreted as a hexadecimal number).
You must specify the process by its PID.
WARNING: Closing handles can cause application or system instability.
-y Don't prompt for close handle confirmation.
-s Print count of each type of handle open.
-u Show the owning user name when searching for handles.
-p Dump handles belonging to process (partial name accepted).
name Search for handles to objects with <name> (fragment accepted).
No arguments will dump all file references.
What am I doing wrong?