find out which programs has a file in use

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
compie
Junior Member
Junior Member
Posts: 93
Joined: 2003-07-06, 18:47 UTC

find out which programs has a file in use

Post by *compie »

Is there a tool for total commander that can find out which process has a file opened? This is usefull when you can't delete a file or when you can't use 'safely remove hardware' on an usb stick.
User avatar
Sombra
Power Member
Power Member
Posts: 814
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

Try with the plugin UnicodeTest/LockedTest
You can use this field [=unicodetest.Locked test] in a custom column and view if the file is used.
I can read English, but... I write like Tarzan. (sorry)
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

You can use ForceDel.
It lacks many features (like deleting directories / support for multiple files), but it works.
I started adding this features, but it won't be ready soon because I have no time for it.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Unlocker

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
compie
Junior Member
Junior Member
Posts: 93
Joined: 2003-07-06, 18:47 UTC

Post by *compie »

I found a tool myself:
Handle from sysinternals:
http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/Handle.mspx

Here is how you can use it:
Unzip handle.zip somewhere.
Create a a file runhandle.bat in the same directory:

@echo off
echo Finding processes that have opened files with path:
echo %1
handle %1
pause

Add (drag and drop) this batch file to the button bar. Change the parameters of the button to %P%N

To use it:
Stand on the file/directory you want to test
Click on the button.

Example output:

Finding processes that have opened files with path:
c:\Temp


Handle v3.2
Copyright (C) 1997-2006 Mark Russinovich
Sysinternals - www.sysinternals.com

WINWORD.EXE pid: 2144 288: C:\Temp\test.doc
Press any key to continue . . .
Last edited by compie on 2007-01-23, 13:10 UTC, edited 2 times in total.
compie
Junior Member
Junior Member
Posts: 93
Joined: 2003-07-06, 18:47 UTC

Post by *compie »

I only have one problem with the handle tool: I can't use it on a complete drive letter.
I can't drag the drive button to the handle tool on the button bar.
When I open 'My Computer' in total commander (with the command cm_OpenDrives) and then run the tool it passes a single drive as the parameter ""\\My Computer\C:""
This doesn't work of course.
compie
Junior Member
Junior Member
Posts: 93
Joined: 2003-07-06, 18:47 UTC

Post by *compie »

Unlocker works great!
I think I will use that.

I wish Total Commander 7 could integrate some of the functionality of Unlocker.

So when deleting an in-use file, instead of
"Access denied on file..."
you would get:
"Could not delete file test.doc
because it is in use by Microsoft Word"
Last edited by compie on 2007-01-23, 15:36 UTC, edited 2 times in total.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Unlocker looks nice in description, but doesn't work without explorer extension (and I have no time to check what parameters it gets). Maybe Handle will be better..
compie
Junior Member
Junior Member
Posts: 93
Joined: 2003-07-06, 18:47 UTC

Post by *compie »

m^2 wrote:Unlocker looks nice in description, but doesn't work without explorer extension (and I have no time to check what parameters it gets). Maybe Handle will be better..
You can just use %P%N as parameter for unlocker.
So it does work without the explorer context menu.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Oh, it needs path... I tried without.
Thank you :)
But before I will use it I need switches to quietly delete / rename the file. I already wrote an email to the author.

But I won't abandon improving ForceDel - Unlocker doesn't delete comments, doesn't support multiple files and (probably) doesn't implement advanced process termination methods. (See APT).

ADDED:
To get the silent mode I would have to add Unlocker-Always-Silent.reg to the registry.
Not portable - worthless for me, but maybe not for someone else.
(ok, I could create NSIS laucher, but I prefer to modify ForceDel).
compie
Junior Member
Junior Member
Posts: 93
Joined: 2003-07-06, 18:47 UTC

Post by *compie »

run "unlocker.exe -?" for command line options.

It can probably do everything you need.
TealC
Junior Member
Junior Member
Posts: 96
Joined: 2005-08-10, 11:34 UTC

Post by *TealC »

just wanted to mention:
theres a tool from nirsoft, called opened files viewer which shows all opened files and the associated processes

--> http://nirsoft.net/utils/opened_files_view.html
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

compie wrote:run "unlocker.exe -?" for command line options.

It can probably do everything you need.
Yes, it satisfies my needs, thank you.
BTW, it's a pitty it's so hard to get any help from the program itself...
Post Reply