How to run Total Commander from command line and execute an internal cm_ command/a user em_ command/a chain of commands?

English support forum

Moderators: Stefan2, Hacker, petermad

Post Reply
User avatar
beb
Power Member
Power Member
Posts: 762
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

How to run Total Commander from command line and execute an internal cm_ command/a user em_ command/a chain of commands?

Post by *beb »

For instance:
totalcmd64.exe /O /S /UnknownSwitch cm_selectAll
totalcmd64.exe /O /S /UnknownSwitch cm_selectAll,em_UserCommandToDoSomethingWithSelection
It could be pretty similar to existing:
totalcmd64.exe /O /S /A d:\path\file.name
or in Internal Associations:
totalcmd64.exe /O /S ***em_UserCommandToDoSomethingWithSelection

# https://www.ghisler.ch/wiki/index.php?title=Command_line_parameters
# https://www.ghisler.ch/wiki/index.php?title=List_of_internal_commands

Edit:
OK, Google tells me I can run:
totalcmd64.exe /O /S /A em_something
However, I cannot wrap an internal command like cm_selectAll into em_selectAll.
Therefore, I cannot run:
totalcmd64.exe /O /S /A em_selectAll
if em_selectAll is:

Code: Select all

[em_selectAll]
cmd=cm_selectAll
Why so?
#278521 User License
Total Commander [always the latest version, including beta] x86/x64 on Win10 x64/Windows 11/Android 17
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7573
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: How to run Total Commander from command line and execute an internal cm_ command/a user em_ command/a chain of comma

Post by *Horst.Epp »

beb wrote: 2026-06-11, 19:10 UTC Why so?
I guess that directly after the TC start-up there is no current file list to select from
when the em_command is executed.
Windows 11 Home, Version 25H2 (OS Build 26200.8737)
TC 11.58 x64 / x86
Everything 1.5.0.1416b (x64), Everything Toolbar 2.4.1
QAP 12.3 x64, Listary Pro 7.0.0.3 beta
User avatar
beb
Power Member
Power Member
Posts: 762
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: How to run Total Commander from command line and execute an internal cm_ command/a user em_ command/a chain of comma

Post by *beb »

beb wrote: 2026-06-11, 19:10 UTC OK, Google tells me I can run:
totalcmd64.exe /O /S /A em_something
Well, it looks like yet another example of LLM hallucination.
Nothing like that works.
Even the simplest commands under the em_something (like cd c:\) fail.
#278521 User License
Total Commander [always the latest version, including beta] x86/x64 on Win10 x64/Windows 11/Android 17
Post Reply