Who has a file open?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
gtwatson77459
Junior Member
Junior Member
Posts: 31
Joined: 2008-02-15, 13:59 UTC
Location: Houston, Tx

Who has a file open?

Post by *gtwatson77459 »

Is there a plugin for TC that will add a custom column that lists the username that has a file open?

We are on a network with many users who leave their computers on and software running on a shared network drive. I would like to see the user who has an EXE file open so I can go over and shut down their PC so I can update to a newer version of the EXE they have open.

I'm running Win7-64 if that matters.

TIA
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50934
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, not to my knowledge. Personally I'm using the Tool LockHunter, which is accessible from the TC context menu.
Author of Total Commander
https://www.ghisler.com
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

ghisler(Author) wrote:... the Tool LockHunter....
Seem to have problems with files in Network :cry:

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50934
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Is there a tool which can do this over a network? Not to my knowledge.
Author of Total Commander
https://www.ghisler.com
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

ghisler(Author) wrote:Is there a tool which can do this over a network? Not to my knowledge.
I do not know. One of my admins tried today with "Process Explorer" from Sysinternals and he get the "Handles". But he did it on his PC.

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

The commands "openfiles" and "net file" allow this.
With
openfiles /query /s servername
you can query a remote system.
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

ZoSTeR wrote:The commands "openfiles" and "net file" allow this.
With
openfiles /query /s servername
you can query a remote system.
You mean these are commands from "CMD" and not from another software?

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
MVV
Power Member
Power Member
Posts: 8713
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Theese are command-line tools and may be used from any command-line software (cmd.exe is an example). Both require admin rights or elevation.
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

Thanks to both :D

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

Here's s simple solution to query a specific file.
Button code, copy and paste and replace the servername:

Code: Select all

TOTALCMD#BAR#DATA
%comspec% /k openfiles /query /fo csv /s servername | find /i
"%N"
%comspec%


0
-1
User avatar
MVV
Power Member
Power Member
Posts: 8713
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

BTW openfiles works incorrectly under Windows x64 (it seems that 64-bit version must be used here). So %windir%\SysNative\cmd.exe should be used instead of %comspec%.

And, under Vista/7 with UAC it requires admin rights, so button must be started with elevation (or path to my Sudo tool may be inserted at the beginning of command line).
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

ZoSTeR wrote:Here's s simple solution to query a specific file.
Button code, copy and paste and replace the servername:
....
Using it from UNC-path, I get an error "UNC not supported .... and more .."
Using it from a mapped network-drive I get:

Code: Select all

FIND: Parameter format not correct
ERROR: Access is denied
My permissions:
I have full rights of the network-share, but I don't have full admin-rights.

Peter
TC 10.xx / #266191
Win 10 x64
Post Reply