FAQs: TCs' internal commands - how-to find and use them

English support forum

Moderators: white, sheep, Hacker, Stefan2

Post Reply
User avatar
Power Member
Power Member
Posts: 3235
Joined: 2007-09-13, 22:20 UTC
Location: Europa

FAQs: TCs' internal commands - how-to find and use them

Post by *Stefan2 »

How to find and use TCs' internal command

TCs' internal commands are listed in a file named "TOTALCMD.INC" in the TC folder.
Open it in Notepad to inspect the commands. (In TC, select the file and press F3 or F4 key on your keyboard)
(Alternatively you can also type 'cm_CommandBrowser' into the TC command line bar to open the 'Command Browser')

For example, I searched for command to un-select/de-select every file and folder again.

So I opened the "TOTALCMD.INC" and searched for "selec"
as part of a command name I was imagine it would be named like this,...
and then I found this line:
cm_ClearAll=524;Unselect all (files+folders)

This "cm_ClearAll" is the internal command I searched for.
"524" is the internal command number you can use too at some places.

How to use a TC internal command

There are several ways to use this command:

Assign a keyboard shortcut to that command:
Menu "Configuration > Options... > Misc."
Choose [X] Control + [X] Alt + A
Command: <click at the lupe and choose cm_ClearAll>

As Ctrl+A is the shortcut to SELECT ALL,
so Ctrl+Alt+A fits well for this DEselect command.
You could also choose Ctrl+/ (The NumPad ./. key)
as "NumPad ./." is assign to "cm_RestoreSelection=529;Restore last Selection"

- - - - -

Use it in a menu file:
MENUITEM "Unselect all files + folders\tABCD+EFG+H", 524

"\t" will insert a tab for horizontal adjustment of the shortcut.
Instead of "ABCD+EFG+H" you could write the shortcut you have assigned to that command, if any.
"524" or "cm_ClearAll" is the command to be executed.

- - - - -

Add an button to the button bar to execute that command:
- right mouse click at the button bar >> Change...
- click at [Add] on the left
- Command: <click at the lupe, or just type: cm_ClearAll>
- Parameters: <empty>
- Start path: <empty>
- Icon file: WCMICONS.DLL
- Icon: <chose one you like>
- Tooltip: cm_ClearAll; Unselect all (files+folders)

Explanation for "Icon file":
“WCMICONS.DLL” holds some icons for us to use.

Some another icon resource are e.g.:

Code: Select all

%windir%\system32\SHELL32.dll       (Windows Shell Common)
%windir%\system32\imageres.dll      (Windows Image Resource)
%windir%\system32\ieframe.dll       (Internet Explorer)
%windir%\system32\wmploc.dll        (Windows Media Player)
%windir%\system32\setupapi.dll      (Windows Setup API)
%windir%\hh.exe                     (HTML Help sign)
%windir%\system32\shdocvw.dll       (three shields: ! ? X)
%windir%\system32\wiashext.dll      (Imaging Devices)
%windir%\system32\mmres.dll         (General Audio Resources) 
%windir%\system32\comres.dll        (COM+ Resources)
%windir%\system32\wpdshext.dll      (Portable Devices, Arrows)
%windir%\system32\pifmgr.dll        (Windows NT PIF Manager)
%windir%\system32\moricons.dll      (Windows NT Setup, old DOS)
%windir%\system32\pnidui.dll        (Network System Icons)
%windir%\system32\netshell.dll      (Network Connections)
%windir%\system32\mmcndmgr.dll      (Management Console Node Manager)
%windir%\system32\ddores.dll        (Device Category Information and Resources)
%windir%\system32\compstui.dll      (Common Property Sheet, check, x, -, +, )
Thanks to: http://diymediahome.org/windows-icons-reference-list-with-details-locations-images/

- - - - -

Always remember tp press the F1 key while you are in a dialog window to get more help.
Also, with the above keywords you are now able to search the forum for more information on this topic.

- - - - -

Short excerpt from TOTALCMD.INC file:

Code: Select all

cm_SrcQuickview=304;Source: Quick view panel
cm_VerticalPanels=305;File windows above each other

cm_LeftComments=100;Left: Show comments
cm_LeftShort=101;Left: Only file names


cm_List=903;View with Lister
cm_PackFiles=508;Pack files

cm_Config=490;Conf: Layout (first page)
cm_ChangeStartMenu=700;Change Start menu

cm_NetConnect=512;Network connections
cm_AdministerServer=2204;Connect to admin share to open \\server\c$ etc.

cm_ExecuteDOS=511;Open command prompt window
cm_CompareDirs=533;Compare dirs

cm_DirectCableConnect=2300;Connect to other PC by cable

cm_PrintDir=2027;Print current directory (with preview)

cm_SelectFolders=3313;Select group: just folders
cm_SelectCurrentExtension=527;Select all files with same ext.

cm_EditPermissionInfo=2200;Permissions dialog (NTFS)

cm_CopyToClipboard=2008;Copy selected files to clipboard
cm_CopyNamesToClip=2017;Copy filenames to clipboard
cm_CopyFullNamesToClip=2018;Copy names with full path
cm_CopyFileDetailsToClip=2036;Copy all shown columns

cm_FtpConnect=550;Connect to FTP
cm_FtpDownloadList=558;Download files in download list

cm_DirectoryHistory=572;History list
cm_GoToRoot=2001;Go to root directory

cm_Exit=24340;Exit Total Commander
cm_Maximize=2015;Maximize Total Commander

cm_ClearCmdLine=2004;Clear command line
cm_AddPathToCmdline=2019;Copy path to command line

cm_MultiRenameFiles=2400;Rename multiple files
cm_CommandBrowser=2924;Browse internal commands

cm_VisButtonbar=2901;Show/hide button bar

cm_UserMenu1=701;Start first menu item in Start menu

cm_OpenNewTab=3001;Open new tab

cm_SrcSortByCol1=6001; Sort by first column

[________Custom column views_________]=0
cm_SrcCustomView1=271; Source: Custom columns 1

[________Commands with parameters_________]=0
;These negative numbers are just used for translation and cannot be used instead of the commands
CD <directory>=-2;Switch to the given directory
OPENTABS <filename>=-3;Open tabs from saved .tab file
FTPOPEN <conf. ftp server>=-5;Open stored ftp connection

Example use of an command with an button:

Code: Select all

Command    = cm_CopyNamesToClip
Parameters = 
Start path = 
Icon file  = WCMICONS.DLL
Tooltip    = Copy filenames to clipboard
See TOTALCMD.INC file for more commands.

More about buttons at >> FAQs: How to create an button

Finde mich: TC-interne Kommandos (cm_xxx) / Befehlsbrowser
Find me: internal commands em_command cm_CommandBrowser
Last edited by Stefan2 on 2015-07-18, 21:31 UTC, edited 1 time in total.
Post Reply