Dialog box: Choose command
This dialog box allows you to choose an internal command from the file totalcmd.inc, and to define new commands stored either in usercmd.ini or a language-specific wcmd_lng.ini.
Field Description
Category: Category of the command. All commands are listed in the first category "All"
Command: Name of the command
Nr: Numeric value of the command
Description: Translated description of the command
Filter: Allows you to show only commands containing the specified word
Only on the pages usercmd.ini and wcmd_lng.ini:
New... Define a new extended command em_xyz. An extended command can be used to call a program with parameters also from the main menu and with a hotkey.
Edit... Change an existing user-defined command.
Delete Delete a user-defined command
Rename/Copy... Allows you to rename a command, and to create a copy of a command under a different name
Note: A command can be copied to the clipboard with Ctrl+C in the list of commands. Ctrl+Shift+C copies the entire line with the description.
List of internal commands which support a parameter:
All commands on the "Commands with Parameters" page support parameters. They also show which parameters are supported. In addition, the following cm_ commands support optional parameters:
Note: * stands for Left, Right, or Src
cm_Copy, cm_RenMov: All the options shown in the dialog box can be passed as parameters (starting with a slash). Each of the checkbox options takes an optional parameter 1 or 0, e.g. V0 turns off verify if it was enabled before.
P: Copy NTFS permissions.
V: Verify after copy
B0: Copy in foreground (even when AlwaysCopyInBackground is set in wincmd.ini)
B1: Copy in background (like F5-Enter-Background)
B2: Copy in background transfer manager
O0..9: Overwrite options, numbers as in the dialog box
R: Preserve relative paths when copying from branch view (R or R1=yes, R0=no)
S: Skip all which cannot be opened for reading
H: Overwrite/delete hidden/system/read only files
A: Copy to all selected folders in the target panel
G: Go: Start copying immediately
T="path": Target path, MUST be put in double quotes, and end with a backslash if a directory, or with a file mask with wildcards to rename files
W="wildcards": Copy only files of this type.
Note: If you need double quotes around the wildcards, you need to put them in double quotes twice
Example: cm_Copy /V0H1T="c:\test\"W"""a test.*"" test2.*"
cm_CreateShortcut Supports the following parameters from cm_Copy and cm_RenMov:
O, G, T and W.
For T="path", Total Commander will add a missing \*.lnk or \*.*.lnk to properly name link files.
cm_PackFiles All the options shown in the dialog box can be passed as parameters (starting with a slash). Each of the checkbox options takes an optional parameter 1 or 0.
T="target name": path and file name of the archive. Use T="" or T="." to pack to source directory with default name, or T="c:\path\." to pack to given path with default name.
D: Also pack path names (only recursed)
R: Recursively pack subdirectories
S: Multiple disk archive (ZIP, ARJ, RAR, ACE)
M: Move to archive
X: Create self extracting archive
O0..4,7,8: Overwrite options, numbers as in the F5 copy dialog box. 5,6 and 9 are not supported.
A: Create separate archives, one per selected file/dir
B: Leave out base directory when packing folders
C: Encrypt
P="password": provide password (needs /C option)
G: Go: Start copying immediately
E="extension": packer type as shown in the pack dialog
Z0..10: ZIP compression rate, 0=stored, 10=LZMA. Only used for ZIP, GZ and TGZ (the latter two 1..9 only)
cm_UnpackFiles All the options shown in the dialog box can be passed as parameters (starting with a slash). Each of the checkbox options takes an optional parameter 1 or 0.
T="path": Destination path, MUST be in double quotes. use T="." to unpack to the location of the archive
D: Unpack the path names of the files
O0..4,7,8: Overwrite options, numbers as in F5 copy dialog. 5, 6 and 9 are not supported.
S: Extract each archive into a separate subdirectory
P="Password": Enter password (only ZIP, RAR and internal 7ZIP)
A="Password": specify password for archive (encrypted filenames, only 7zip internal)
G: Go: Start unpacking immediately
W="wildcard": Extract only files of this type. Double quotes " must be specified twice, e.g. for names with spaces: /W="file1.txt ""file 2.txt"" file3.txt". Special case: /W="" unpacks selected files from an open archive (like F5).
cm_Edit The following parameters can be passed to the function behind a slash:
C: Create files which do not already exist
T: Instead of creating an empty file, copy a template file to the new name. By default, the user's template directory will be used. The first file in it with the same extension will be copied to the new file. If no file is found, an empty file will be created
T="c:\path": Sames as T but use the specified template directory
N="name": The name(s) of the file(s) to be created - separate multiple file names with the | character. Alternatively, use templates from the "+" button to create multiple files.
G: Go, create new files immediately (has no effect when not using C)
L: Launch type: L0=do not launch, L1=open with default editor, L2=open with associated program (including internal associations), L3=open with associated program (no internal associations)
V="verb": Combined with L2 or L3, set the verb to open the file, e.g. "open" or "edit". Leave out or use V="" for default verb. With L1, WinExec will be used when not using V, otherwise ShellExecuteEx (which is always used for L2 and L3).
cm_List,
cm_ListOnly,
cm_ListInternalOnly Specifies the name of the file to be opened in the Lister. Supports the same options as the command line parameter /S=L:parameters. Must be passed before the name, and start with a slash / (without the part S=L: of the command line parameter), e.g.
cm_List /T1V file_name for text mode, variable width font
cm_ListMulti,
cm_ListInternalMulti Like cm_List, only supports parameters plus one file name maximum (optional)
cm_ListExternal Now supports one file name (optional)
cm_Wait Set the delay in milliseconds to wait until starting the next command
cm_Select,
cm_Unselect,
cm_Reverse Change selection of the next x files from the current cursor position
cm_GoToFirstEntry Go down from first file/folder to the specified entry, e.g. cm_GoToFirstEntry 1 goes to the second file/folder
cm_GoToFirstFile Go down from first file to the specified entry, e.g. cm_GoToFirstFile 1 goes to the second file
cm_LeftSwitchToThisCustomView
cm_RightSwitchToThisCustomView Switch to the specified custom view mode.
cm_SearchForInCurDir Search specified drive letter
cm_100Percent Split relative panel size, the specified value (e.g. 60 percent) is applied to the active panel
cm_50Percent Like cm_100Percent, but the given value (in percent) will be added to the width of the active panel, e.g. cm_50Percent -10 (for a with of 50%, results in a new width of 40%)
cm_*ViewModeList Switch to the specified view mode by index:
0: switch to default view mode
>0: switch to user-defined view mode with that index
cm_RereadSource 1: forces refresh even if nothing has changed in that directory, e.g. to re-load icons and overlays
2: re-applies automatic view mode change to current directory
3: both
cm_UnloadPlugins 0: unload all plugin types (except for tcmatch dll), or use sum of
1: packer plugins
2: file system plugins
4: Lister plugins
8: Content plugins
16: External tcmatch dll
cm_*ActivateTab* Numeric parameter x>0: Activate tab x, e.g. cm_SrcActivateTab1 5
Numeric parameter x<0: Count from the end, e.g. activate last tab: cm_SrcActivateTab1 -1
cm_CloseCurrentTab 1: close locked tab without confirmation
cm_CloseAllTabs 1: close unlocked tabs without confirmation
2: close also locked tabs, with confirmation
3: close also locked tabs, without confirmation
cm_CopyFileDetailsToClip,
cm_CopyFpFileDetailsToClip,
cm_CopyNetFileDetailsToClip,
cm_CopyHdrFileDetailsToClip,
cm_CopyHdrFpFileDetailsToClip,
cm_CopyHdrNetFileDetailsToClip, Copy only specific columns:
1=name+extension, 2=first additional column, 4=second additional column, 8=third etc.
Note: 1 alone copies full list with headers, for backwards compatibility
cm_*OpenDrives Drive letter or drive number: 65=A, 66=B, 67=C etc., or
\=root, .=parent, [=network neighborhood
cm_OpenDriveByIndex Open drive which is shown in Nth place in the drive button bar or the drive dropdown combobox, respectively
Numbers above 0 and below 100 count from the first button (=1), but only open drive letters
Numbers above 100 count from the first button (=101), and also open any other folder types
Numbers below -100 count from the last button, so -101 would be the last button, -102 the second-last etc.
Numbers below -1 but above -100 count from the last drive letter
If the Drive button bar is disabled, numbers below -100 count from the last item in the drive combobox, so -101 is "Network", -102 is "Documents (directory)" etc.
cm_ZoomIn,
cm_ZoomOut Set zoom factor for thumbnails directly to a specific value, e.g. cm_ZoomIn 150
cm_*ByName, cm_*ByExt, cm_*BySize, cm_*ByDateTime
0 or no parameter=toggle, 1=ascending, 2=descending
4: When added, sort by additional columns, e.g. cm_SrcBySize 5 adds sort by size, ascending
8: Store current sort order, sort direction and additional sort columns internally
9: Restore all sort order parameters stored with option 8
cm_*NegOrder 0 or no parameter=toggle, 1=set, -1 or 2=reset
8: Store current sort order, sort direction and additional sort columns internally
9: Restore all sort order parameters stored with option 8
cm_*UserSpec 8: Store current file filter (including "All Files" and "Programs")
9: Restore previously stored file filter
cm_EditNewFile 1: Create new file but do not open editor
cm_QuickFilter 1: Open quick filter dialog with last used quick filter
cm_Exit 0 or no parameter: Just exit. Or sum of:
1: Exit and restart Total Commander
2: Exit and restart, and switch between 32-bit and 64-bit versions
4: Save directories, tabs and panels (brief, full etc.) even when disabled in settings
8: Pass current left and right directory and file under cursor to new instance
16: Restart as administrator
The following internal commands support 3 states: 0 or no parameter=toggle, 1=set, -1 or 2=reset.
cm_*Comments
cm_DirBranch, cm_LeftDirBranch, cm_RightDirBranch,
cm_DirBranchSel, cm_LeftDirBranchSel, cm_RightDirBranchSel,
cm_FtpHiddenFiles
cm_*Thumbs,
cm_*QuickView, cm_*QuickInternalOnly, cm_SeparateQuick*
cm_SyncChangeDir,
cm_SwitchLongNames,
cm_SwitchHidSys, cm_SwitchHid, cm_SwitchSys,
cm_Switch83Names,
cm_SwitchDirSort,
cm_SwitchOverlayIcons,
cm_SwitchWatchDirs,
cm_SwitchIgnoreList,
cm_SwitchX64Redirection,
cm_SwitchFileTipWindows,
cm_SwitchColorsByFileType,
cm_ToggleAutoViewModeSwitch,
cm_VerticalPanels,
cm_ShowCmdLineHistory,
cm_Vis*