Page 1 of 1

Total Commander Support

Posted: Fri May 29, 2009 9:55 am
by David
To open folders with Total Commander:
  • In Everything, from the Tools menu, click Options.
  • Click the Context menu tab on the left.
  • Select Open (Folders)
  • Change Command to:
    $exec("c:\Program Files\totalcmd\TOTALCMD64.EXE" /O /T /L="%1")
  • Select Open Path
  • Change Command to:
    $exec("c:\Program Files\totalcmd\TOTALCMD64.EXE" /O /T /L="%1")
  • Click OK.
-The following method no longer works-

To open folders with Total Commander:
Add the following lines to the end of the Everything.ini file in your "Everything" installation folder:

Code: Select all

open_folder_path_command=$exec("C:\Program Files\totalcmd\TOTALCMD.EXE" /O /T "$parent(%1)")
open_folder_command=$exec("C:\Program Files\totalcmd\TOTALCMD.EXE" /O /T "%1")
To open files with Total Commander:
Add the following line to the end of the Everything.ini file in your "Everything" installation folder:

Code: Select all

open_file_command=$exec("C:\Program Files\totalcmd\TOTALCMD.EXE" /O /T /L="%P" "%1")
Thanks to Robert Hindal

Re: Total Commander Support

Posted: Sat May 30, 2009 12:06 am
by ouzoWTF
Thanks for that!

Re: Total Commander Support

Posted: Mon Jul 13, 2009 9:58 pm
by uneasy
Total Commander plugin is available

http://forum.voidtools.com/viewtopic.php?f=2&t=379

Re: Total Commander Support

Posted: Wed Sep 02, 2009 7:12 pm
by ate
Thirst, Thanks for the brilliant search-tool.

I'm working with Total Commander on Vista32 with UAC.

If I use the given strings ... everything works o.k.

But my TC is portable and so I changed the path (C:\Program Files\totalcmd\TOTALCMD.EXE ...) to "%COMMANDER_PATH%\TOTALCMD.EXE ...."

If I start the TC with admin privileges and then start everything ... search ... Enter ... the result is given in the TC. That's o.k.

But this don't work with a normal TC (started without admin privileges). ... search ... Enter ... Error-Message: "%Commander_Path%\TOTALCMD.EXE" was not found ....

Could you help me ?

PS: Relative paths, like ".\..\TOTALCMD.EXE", don't work. Everything.exe in the root of the TC-Directory and only calling the "TOTALCMD.EXE ...." don't work.

/Edit: I made a button in TC with

command: %commander_path%\tools\everything\start_uac.bat %commander_path%
param: n o t h i n g
path: %commander_path%\tools\everything

and wrote a Batch

Code: Select all

@echo=off 
FIND /c /I "%1" everything.ini 
IF errorlevel 1 goto INI 
IF errorlevel 0 goto Start 

:Start 
start everything.exe 
goto End 

:INI 
echo open_folder_path_command=$exec("%1\TOTALCMD.EXE" /O /T "$parent(%%1)")>> everything.ini 
echo open_file_command=$exec("%1\TOTALCMD.EXE" /O /T /L="%%P" "%%1")>> everything.ini 
echo open_folder_command=$exec("%1\TOTALCMD.EXE" /O /T "%%1")>> everything.ini 
start everything.exe 

:End
It's only a workaround.

Re: Total Commander Support

Posted: Mon Oct 05, 2009 8:47 pm
by WhACKO
I don't like the workaround for running portable TC, since Everything is itself a portable app, I would love if it could use relative paths to open files in TC, based on the folder it is run from.

Please consider adding such an option.

Re: Total Commander Support

Posted: Tue Oct 06, 2009 12:48 pm
by David
Is it possible to use the full path to TC, with out the %TotalCommander_Path% variable?
It looks like TC can not set the system environment variable when it is run with out admin privileges.

Perhaps a few new functions are needed?

$GetModulePathFromWindowClass(class)

To get the TC path we would call
$parent($GetModuleFileNameFromWindowClass("TC_CLASS"))
I am not sure what the TC class is ... but it would have to be running for this to work..
I don't like the workaround for running portable TC, since Everything is itself a portable app, I would love if it could use relative paths to open files in TC, based on the folder it is run from.
Something like:

Code: Select all

open_folder_path_command=$exec(".\TOTALCMD.EXE" "%1")
?

Re: Total Commander Support

Posted: Tue Oct 06, 2009 2:08 pm
by rando
Would it be also possible to open TC when double click on path in path column?
(allow double click in path column enabled)

Re: Total Commander Support

Posted: Tue Oct 06, 2009 8:46 pm
by WhACKO
To get the TC path we would call
$parent($GetModuleFileNameFromWindowClass("TC_CLASS"))
I am not sure what the TC class is ... but it would have to be running for this to work..
This is a great Idea, but like you said, TC has to be running for it to work.

I still would prefer to have a variable like %EVERYTHING_PATH% based on the .exe location. Or if it's simpler just this would do the same thing:

Code: Select all

open_folder_path_command=$exec("..\TC\TOTALCMD.EXE" "%1")

Thanx.

Re: Total Commander Support

Posted: Wed Oct 07, 2009 4:54 am
by David
Please try http://www.voidtools.com/Everything-1.2.1.431a.zip
  • added relative path support to $exec.
Relative paths are always relative to the Everything.exe (not the current directory).

Re: Total Commander Support

Posted: Wed Oct 07, 2009 5:58 am
by Boofo
David,

I have the Everything directory of drive D (my backup drive) and TC is on drive C. How would the relative paths work for that?

Re: Total Commander Support

Posted: Wed Oct 07, 2009 7:40 am
by David
How would the relative paths work for that?
Relative paths are only useful for the same drive, you could mix the full path in with the absolute path, but its completely pointless, ie ..\..\..\d:\foo\bar\tc.exe is the same as d:\foo\bar\tc.exe

Why would TC be on a different drive to Everything?
Can you use the absolute TC path in this case?
Would it be also possible to open TC when double click on path in path column?
(allow double click in path column enabled)
"Everything" should use the open_folder_path_command when this option is enabled.

Re: Total Commander Support

Posted: Wed Oct 07, 2009 8:14 am
by Boofo
Everything is on a different path because my D drive is my backup drive. I use that for all portable-type installs in case I ever lose drive C for whatever reason. It makes getting back up and running a lot easier and faster.

Re: Total Commander Support

Posted: Wed Oct 07, 2009 11:54 am
by WhACKO
I don't think you can have relative paths based on different drives?
You can use %SYSTEMROOT% to access the drive where windows is installed, or you can set your own variables at startup but this defeats the use of relative paths IMO.

Re: Total Commander Support

Posted: Wed Oct 07, 2009 12:11 pm
by Boofo
I wonder if %programfiles% would work.

OK, I just tried it and it works! Even though Everything is on my D drive, it still finds Total Commander on the C drive with the following:

Code: Select all

open_folder_path_command=$exec("%ProgramFiles%\totalcmd\TOTALCMD.EXE" /O /T /L="%1")
open_file_command=$exec("%ProgramFiles%\totalcmd\TOTALCMD.EXE" /O /T /L="%1")
open_folder_command=$exec("%ProgramFiles%\totalcmd\TOTALCMD.EXE" /O /T /L="%1")

Re: Total Commander Support

Posted: Wed Oct 07, 2009 12:49 pm
by Boofo
I can even go one better with %COMMANDER_PATH%. TC sets the path on install.

Code: Select all

open_folder_path_command=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_file_command=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_folder_command=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")

Re: Total Commander Support

Posted: Fri Oct 09, 2009 6:24 pm
by WhACKO
Thanks David!

The relative path based on Everything's exe works, now if I only had the time to set up all my portable apps.... and figure out a way to use two profiles - for work and home :roll:

Thank you again for the quick implementation of the suggestion, Everything is a must have app!

Re: Total Commander Support

Posted: Fri Oct 09, 2009 6:39 pm
by Boofo
WhACKO wrote:The relative path based on Everything's exe works, now if I only had the time to set up all my portable apps.... and figure out a way to use two profiles - for work and home :roll:
Running the app from a simple bat or cmd file with conditionals should solve the work vs home profiles problem.

Re: Total Commander Support

Posted: Sat Oct 10, 2009 8:40 am
by rando
I've downloaded the latest beta.
I noted that the file "everything.db" is in the root of C drive.

Re: Total Commander Support

Posted: Sat Oct 10, 2009 10:23 am
by David
I've downloaded the latest beta.
I noted that the file "everything.db" is in the root of C drive.
What is your database location set to (See Tools->Options->Volumes->Database location)?
If it is empty, are there any errors reported in the Errorlog.txt file in your "Everything" installation folder?

Re: Total Commander Support

Posted: Sat Oct 10, 2009 4:25 pm
by rando
David wrote:
I've downloaded the latest beta.
I noted that the file "everything.db" is in the root of C drive.
What is your database location set to (See Tools->Options->Volumes->Database location)?
If it is empty, are there any errors reported in the Errorlog.txt file in your "Everything" installation folder?
Yes it is empty.

There is an error in errorlog.txt:

28/05/2009 21.11.15: Everything 1.2.1.371: .\src\db.cpp(4411): db::_load(): if (2005648 + 16752664 + 4 > 2398864): Invalid folder offset.

Re: Total Commander Support

Posted: Mon Oct 12, 2009 11:45 am
by David
I've downloaded the latest beta.
I noted that the file "everything.db" is in the root of C drive.
This problem has been fixed in:
http://www.voidtools.com/Everything-1.2.1.432a.zip
  • fixed relative db location.

Re: Total Commander Support

Posted: Mon Oct 12, 2009 12:37 pm
by rando
thank you :)

Re: Total Commander Support

Posted: Wed Dec 07, 2011 1:57 pm
by ghirin
Guys!

This search tool is brilliant! Together with Total Commander - it is superb combination! Thanks!!!!
:D

Re: Total Commander Support

Posted: Wed Apr 22, 2020 5:23 am
by arkos
Sorry for bringing-up the old topic, but...
Boofo wrote:
Wed Oct 07, 2009 12:49 pm

Code: Select all

open_folder_path_command=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_file_command=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_folder_command=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
I have appended these lines to the end of

Code: Select all

"C:\Users\arko\AppData\Roaming\Everything\Everything.ini"
however they seem to not cause any effect. Shall they be added elsewhere?

Re: Total Commander Support

Posted: Wed Apr 22, 2020 5:34 am
by void
Please try using open_folder_path_command2, open_file_command2 and open_folder_command2:

Code: Select all

open_folder_path_command2=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_file_command2=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_folder_command2=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")

Re: Total Commander Support

Posted: Wed Apr 22, 2020 6:01 am
by arkos
void wrote:
Wed Apr 22, 2020 5:34 am
Please try using open_folder_path_command2, open_file_command2 and open_folder_command2:

Code: Select all

open_folder_path_command2=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_file_command2=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_folder_command2=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
Gets interesting:

Open path -- opens using
explorer.exe

Open (first menu item from top) -- Image
...apparently
%COMMANDER_PATH%
is not being set by the v9.51 installer... Also, noticed that snippet above implies x86 Commander.

What works for x86_64 Commander installation, default path:

Code: Select all

open_folder_command2=$exec("c:\Program Files\totalcmd\TOTALCMD64.EXE" /O /T /L="%1")
open_file_command2=
open_path_command2=$exec("c:\Program Files\totalcmd\TOTALCMD64.EXE" /O /T /L="%1")
explore_command2=
explore_path_command2=
Not sure what
explore_
prefix does so left empty. Quick www-search returns a fair amount of configs where these are pointing to TC as well, but so far I fail to see why it is needed :?:

Re: Total Commander Support

Posted: Wed Apr 22, 2020 6:07 am
by void
The explore command is from the XP days where you could right click a folder and click 'Explorer'.
This would open the folder in Explorer with the tree-view enabled. Normally opening a folder would show explorer without the tree view.

On Vista and later the tree view is always shown so the Explorer verb is kind-of redundant.
The explore command is disabled by default when running Everything on Vista or later. It can be re-enabled from Tools -> Options -> Context Menu -> Explore -> Show this item.

Note you can also set your commands from this option page, which might be easier than changing the Everything.ini directly:
  • In Everything, from the Tools menu, click Options.
  • Click the Context menu tab on the left.
  • Select Open (Folders)
  • Change Command to:
    $exec("c:\Program Files\totalcmd\TOTALCMD64.EXE" /O /T /L="%1")
  • Select Open Path
  • Change Command to:
    $exec("c:\Program Files\totalcmd\TOTALCMD64.EXE" /O /T /L="%1")
  • Click OK.

Re: Total Commander Support

Posted: Wed Apr 22, 2020 6:13 am
by arkos
void wrote:
Wed Apr 22, 2020 6:07 am
Note you can also set your commands from this option page, which might be easier than changing the Everything.ini directly:
Neat :) I have overlooked it.

Re: Total Commander Support

Posted: Wed Apr 22, 2020 1:41 pm
by horst.epp
arkos wrote:
Wed Apr 22, 2020 6:01 am
void wrote:
Wed Apr 22, 2020 5:34 am
Please try using open_folder_path_command2, open_file_command2 and open_folder_command2:

Code: Select all

open_folder_path_command2=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_file_command2=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
open_folder_command2=$exec("%COMMANDER_PATH%\TOTALCMD.EXE" /O /T /L="%1")
Gets interesting:

Open path -- opens using
explorer.exe

Open (first menu item from top) -- Image
...apparently
%COMMANDER_PATH%
is not being set by the v9.51 installer... Also, noticed that snippet above implies x86 Commander.

What works for x86_64 Commander installation, default path:

Code: Select all

open_folder_command2=$exec("c:\Program Files\totalcmd\TOTALCMD64.EXE" /O /T /L="%1")
open_file_command2=
open_path_command2=$exec("c:\Program Files\totalcmd\TOTALCMD64.EXE" /O /T /L="%1")
explore_command2=
explore_path_command2=
Not sure what
explore_
prefix does so left empty. Quick www-search returns a fair amount of configs where these are pointing to TC as well, but so far I fail to see why it is needed :?:
%COMMANDER_PATH% like many other TC related variables
can only be used from inside of a running Total Commander.

Re: Total Commander Support

Posted: Fri Jun 05, 2020 2:28 pm
by tuska
Below are a few setting variants in 'Everything' relating to:
Menu "Tools" -> "Options..." -> "Context Menu":

Open (Folders)
Purpose:
After double-clicking on a folder in 'Everything', the contents of this folder are displayed in the active window in Total Commander.
[When using the '/T' parameter, the contents of this folder are displayed *in a new tab* in the active window in Total Commander].
If Total Commander is not open, then the program will be started automatically.

Code: Select all

$exec("Path\To\TOTALCMD64.EXE" /O /A /S "%1")
OR
$exec("Path\To\TOTALCMD64.EXE" /O /A /S /T "%1")

Open (Folders) -> Everything.ini, e.g.:
open_folder_command2=$exec("Path\To\TOTALCMD64.EXE" /O /A /S "%1")
Open Path
Purpose:
After marking a file or folder in 'Everything' and then menu "File" - "Open Path" or using the context menu entry "Open Path"
the file or the contents of this folder are displayed in the active window in Total Commander.
With a selected file in 'Everything', the cursor is then positioned in Total Commander on the file!
[When using the '/T' parameter, the contents of this folder are displayed *in a new tab* in the active window in Total Commander
or the file is opened in the active window in Total Commander *in a new tab* and the cursor is positioned on the file!].
If Total Commander is not open, then the program will be started automatically.

Code: Select all

$exec("Path\To\TOTALCMD64.EXE" /O /A /S "%1")
OR
$exec("Path\To\TOTALCMD64.EXE" /O /A /S /T "%1")

Open Path -> Everything.ini, e.g.:
open_path_command2=$exec("Path\To\TOTALCMD64.EXE" /O /A /S "%1")
Explore Path
Purpose:
$parent(filename) returns the parent folder of the specified file or folder --> See: Tooltip "Explore Path" -> Command:

Example 1 (parent folder of the file):
D:\Testfolder\Folder1\1.jpg
1. Mark the file "1.jpg" in 'Everything'. 2. Execute the "File" - "Explore Path" menu or the "Explore Path" context menu item.
3. In Total Commander the content of the folder D:\Testfolder\Folder1\ is displayed in the active window.
    The cursor is NOT positioned on the file!

Example 2 (parent folder):
D:\Testfolder\Folder1\
1. Mark the folder "Folder1" in 'Everything'. 2. Execute the menu "File" - "Explore Path" or context menu entry "Explore Path".
3. The contents of folder D:\Testfolder\ are displayed in Total Commander in the active window.
    The cursor is NOT positioned on the folder!

[When using the '/T' parameter, *a new tab* in the active window in Total Commander is opened...].
If Total Commander is not open, then the program will be started automatically.

Code: Select all

$exec("Path\To\TOTALCMD64.EXE" /O /S $parent("%1"))
OR
$exec("Path\To\TOTALCMD64.EXE" /O /S /T $parent("%1"))

Explore Path -> Everything.ini, e.g.:
explore_path_command2=$exec("Path\To\TOTALCMD64.EXE" /O /S $parent("%1"))
Total Commander-Help (F1), 4.a. Command line parameters, e.g.
/T Opens the passed dir in a new tab. [--> Double click on a folder in 'Everything'].

Thanks to Horst.Epp for listing of the parameters!
https://ghisler.ch/board/viewtopic.php?p=318142#p318142 (German language)

These settings for 'Everything' <-> Total Commander might also be of interest:
https://ghisler.ch/board/viewtopic.php?p=346372#p346372

Search queries in Total Commander using 'Everything':
https://ghisler.ch/board/viewtopic.php?f=3&t=56800

Re: Total Commander Support

Posted: Thu Jun 25, 2020 3:00 pm
by tuska
In addition to the previous post, I would like to give further examples of solutions
from this Total Commander forum post: Select right panel when I open a path from "Everything" search

Purpose/goal:
If, for example a folder in 'Everything' is double-clicked,
then that folder should always be opened in the right panel in Total Commander.

Setting variants in 'Everything' relating to ..
Menu "Tools" -> "Options..." -> "Context Menu":
Open (Folders) | Open Path

Code: Select all

Code and direct link						     Notes
----------------------------------------------------------------------------------------------------------------------
$exec("c:\path to\TOTALCMD64.EXE"  /O /A /R="%1" /P=R)		--)  	
https://ghisler.ch/board/viewtopic.php?p=389638#p389638		--)  WITHOUT parameter /T --> right TC panel

$exec("c:\Tools\Wincmd\TOTALCMD64.EXE" /O /T /A /R="%1")	-->  
https://ghisler.ch/board/viewtopic.php?p=389622#p389622		-->
								-->  WITH parameter /T    --> right TC panel
$exec("C:\Path\Totalcmd\TOTALCMD64.EXE" /O /T "/R=%1" /A)	-->  
https://ghisler.ch/board/viewtopic.php?p=389629#p389629		-->
Total Commander: F1 - Help, 4.a. Command line parameters wrote:/T  Opens the passed dir(s) in new tab(s). ...
@Total Commander Forum members: Thanks for your support!