FAQs: Summary - Tipps & Tricks collection

English support forum

Moderators: white, sheep, Hacker, Stefan2

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

FAQs: Summary - Tipps & Tricks collection

Post by *Stefan2 »

Deutsche FAQs >>> FAQs: Übersicht - Tipps & Tricks Sammlung >>> viewtopic.php?f=2&t=52423
English FAQs >>> FAQs: Summary - Tips & Tricks collection (this page here / diese Seite hier) >>> viewtopic.php?f=3&t=52425

Code: Select all

Deustch >>> FAQs: Übersicht - Tipps & Tricks Sammlung >>> https://ghisler.ch/board/viewtopic.php?f=2&t=52423
English >>> FAQs: Summary - Tips & Tricks collection >>> https://ghisler.ch/board/viewtopic.php?f=3&t=52425

Here I have collected some knowledge from the forum and sorted thematically.

Many thanks to everybody who had shared their knowledge, without your input this collection wouldn't be possible at all!

General Information:
The FAQ on TC home page > https://www.ghisler.com/efaquser.htm
History.txt > https://www.ghisler.com/history.txt
Wiki > https://www.ghisler.ch/wiki/index.php/Main_Page
Forum > Total Commander (English) >> viewforum.php?f=3

FAQs: Bilder posten verlinken einfügen / How-to post image picture screenshot

FAQs: Total Commander is fully portable / UseIniInProgramDir=7

FAQs: Silent Installation // Automatic deployment

FAQs: TC 9.50 - Tips & Tricks for new user, first settings // Update // Backup

Wiki: What to backup? These are the files you need to backup

Windows x64: Explorer vs TC: Content of System32 folder is different

FAQs: How to create an button / Icons / Variables / Quoting

Shorty Eng/Deu:
How to create an button? // Wie einen Button erstellen? // Button code TOTALCMD#BAR#DATA
>> viewtopic.php?p=390697#p390697

FAQs: Button-code: How-to Copy Share Paste a button ('TOTALCMD#BAR#DATA')

FAQs: Button - How to execute more than one command at once

FAQs: User-Defined Command (UDC) (usercmd.ini) em_command
- Create own commands to use in button or to execute them by an keyboard shortcut.

FAQs: Add keyboard shortcut Hotkey to em_ or cm_ commands

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

Search and copy Video files only // Load/Save Search Criteria // Copy whole folder structure // Only files of this type // Filter view list

How to create a button to ..process.. all files in a folder (ForEachSelectedFileDo... vbs)

FAQs: TC Skripten für jede Datei // TC scripting for each file

FAQs: automate/script TC with AutoHotkey AHK

TC9: "Send WM_USER+50 with wparam" - how-to? (Just some basic examples with AutoHotkey AHK)

FAQs: Copy Base Name To Clip Clipboard w/o Extension
/// Remove Extension
/// Remove last sign, remove trailing backslash
/// Modify names of selected files or folders and copy result to clipboard.

was FAQs: MULTIRENAME LOAD: Multi-rename tool default setting MRT F2 save
FAQs: Multi-rename tool (MRT) / Save+Load template (MULTIRENAME) / Default setting (MultiRenameLoadSettings)

FAQs: INI-History - Clear remove delete drop / INI Redirect Section

Custom columns / User defiened view / Show file details

FAQs: Create a user defined 'Custom Column'

FAQs: PLUGINs - Find / Installing / Removing a plugin:

WDX - Content Plugins // Inhaltsplugins: the most useful, sorted by file type

Copy without question inquiry / interception / interruption (SkippedFileCopy=1)
First copy all files where the user doesn't need to be asked and skip all with errors, ask at the end

FAQs: Color highlight a file (or folder) by any of its properties

FAQs: How to start TC in privileged mode when Windows starts / Run As Admin / admin rights / startup / Autostart / RunAsAdmin / RunAs Admin

FAQs: How to register Total Commander with a license key

FAQs: File comments / descript.ion / descriptions / Ctrl+Z / files.bbs / bytes 04 C3 82

TC Help suggestion > SELECTFILES: Add example how to use modifiers
Supported modifiers: D=only folders, B=both, U=unselect, L=left side, R=right side, T=target panel,
S=Reverts whether just files or files+folders are selected when Shift is pressed during execution
Examples >> https://www.ghisler.ch/board/viewtopic.php?p=317023#p317023

How to use "Everything" indexing utility with TC? by tuska
How to use "Everything" indexing utility with TC? >> viewtopic.php?p=349874#p349874
Can i search folder that contain for example flac audio files? >> viewtopic.php?p=355238#p355238
Search queries in TC using 'Everything' (summary 2020) >> viewtopic.php?p=367192#p367192

Everything integration in TC , petermad

Menu "Show > Custom View Modes" // View Mode / Auto Switch Mode by tuska
How to automatically switch the list view based on defined rules, for example if you enter a folder with a specific string in name.
Collected instructions from forum member tuska - complete overworked, revised edition - Information and examples:
Overview: View Mode | Auto Switch Mode | Custom columns view

- - -

How to use internal file associations effectively

- - -

Menu "Files - Change attributes" > Set writedate Date/Time attributes from parts of filename

- - -

Copy file names to clipboard but change the string:

PowerShell: cm_CopyURINamesToClip.ps1 URI URL encode
PowerShell: cm_CopyBASENamesToClip.ps1 w/o Extension
VBScript: cm_CopyNetIPToClip CopyWithIPAddress mapped drive
PowerShell: cm_CopyModifiedNameToClip

- - -

Lst2Clip - copy user defined paths to the clipboard ("List To Clipboard")

Kommando = %COMMANDER_PATH%\Tools\Lst2Clip\Lst2Clip.exe
Parameter = /P:"/cygwin/" /R:":\"="/" /R:"\"="/" /R:" "="\ " /L:"%L"
Tooltip = for cygwin users 'cm_CopyNetNamesToClip' in unix style.

Kommando = %COMMANDER_PATH%\plugins\List2Clipboard\Lst2Clip.exe /PD:"0"="1" /RB
Parameter = /L:"%P"
Tooltip = Parentfolder ohne trailing backslash


- - -

Here are the instructions to fix the problem with shell extensions:

1. Get the free tool ShellExView:
2. Start it. If using Total Commander 32-bit, you need to get the 32-bit
version, otherwise the 64-bit version of ShellExView.
3. Sort the shell extensions by type
4. Disable all context menu shell extensions one by one (you can hide/keep
those belonging to Windows, they are usually OK).
5. Continue until Total Commander stops hanging
6. Now you can re-enable the extensions which don't cause any problems

- - -

Mal 'was anderes: https://www.youtube.com/watch?v=ojRj2JK5oCI

Find me:

Now something completely different: https://www.youtube.com/watch?v=ObbAc4WaAq4
User avatar
Power Member
Power Member
Posts: 3190
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Template: Button/User command/Keyboard shortcut/Button code

Post by *Stefan2 »

Template: Button/User command/Keyboard shortcut/Button code

Read the help of the application in question if and how it supports to run an special action as command line command.
Next try that command yourself inside of a cmd.exe (Command Prompt ; command-line interpreter). (https://en.wikipedia.org/wiki/Cmd.exe)
Once you know how that work, create a Button or an UserDefinedCommando (UDC) with that found out command.

Maybe you will need to utilize some script of any kind to perform the actual work.
TC will provide a temporary file ("%F" / "%L") with each selected items, one per line.
Use an script or a tool of your choice to parse that temp file line-by-line:
VBScript, JavaScript, MS-DOS Batch, AutoHotkey, AutoIt, PascalScript, PowerPro, PowerShell, Python, Perl, Rexx....
The people on this forum mostly use Batch, VBS, AutHotkey and PowerPro.

Such script you can call from a button, or create a "user defined command" (UDC ; usercmd.ini)
The UDC you can use later as command for a button too, and also can assign a keyboard shortcut to.

There are also tools / add-ons who can support you:
MS-DOS: FOR %%parameter IN (set) DO command >> https://ss64.com/nt/for2.html
MS-DOS: FORFILES [/p Path] [/m SrchMask] [/c Command] >> https://ss64.com/nt/forfiles.html
PowerShell: ForEach-Object >> https://ss64.com/ps/foreach-object.html
MakeBAT by Christian Ghisler - https://www.ghisler.com/dplugins.htm
TCBL aka Bat Builder Launcher - http://tccfestuff.free.fr
List2multiInstance aka List To MultiInstance aka L2M by Andrey V. Sorokin - https://www.ghisler.com/dtools.htm
List2Run by JackFoo (call app for each selected file again and again) - http://ghisler.ch/board/viewtopic.php?t=3418
lst2str by JackFoo (call app one time only with all files as arguments) - https://www.ghisler.com/dtools.htm
lst2clip aka List2Clipboard (addition to cm_CopyFullNamesToClip) - http://www.ghisler.ch/board/viewtopic.php?t=1853

TC will support you by providing Parameters
to pass current File(S) or Folder(S), Target path and more to an external application or script.

Open the help,
search for "Button" to find "Dialog box: Configuration - Change button bar"
or "Help > Operation > Menus > Menu: Configuration > Change Button Bar > Configuration - Change button bar"
or right click an existent button, and then press [Help] and read:
%P > the source path to be inserted into the command line, including a backslash (\) at the end.
%N > places the filename.ext under the cursor into the command line.
%S > insert the names of all selected files into the command line.
%L, %F and more > create a list file with the names of the selected files and directories. (Tip: Dir's have got a trailing backslash).
Also possible:
%P%N > Path\name.ext (TC will quote if space is found)
%P%S > Path\file.ext, Path\file.ext, ... (TC will quote)
"%P%O.E" > Path\file.ext ((TC will NOT quote)

TCs' internal commands
are listed in a plain text file named "TOTALCMD.INC" in the TC folder.
You can type 'cm_CommandBrowser' into the TC command line to read them.

Example Button:
Commando : "D:\rive\path to\YourScriptsSubFolder\your script.ps1"
Parameters: "%L"
Start path: empty
Icon : wcmicons.dll
Tooltip : describe what this script will do for you
Tip: right click an existent button, and then press F1 key and read more about the parameters.

Example Script:
"your script.ps1" content:
Get-Content $Args[0] | ForEach{ ... }
--or all in one button--
Commando : powershell -noProfile -noExit
Parameters: Get-Content '%L' | Foreach{ ... }
( More at > How to process all files in a folder (ForEachSelectedFileDo... .vbs) >> viewtopic.php?p=355257#p355257 )

For your issue use this for example:
* “Configuration > Button bar…”
* In the "Change button bar" dialog, click "Add"
* select an existing command via the 'magnifying glass' symbol
(like for example your 'em_MyCommandName' from below)
or type in the properties as follows:
Command =
Parameters =
Start path = leave empty
Icon file = WCMICONS.DLL or path to your EXE or ICO
Tooltip = your description
Visibility = as you want
Tip: Press F1 key while in "Change button bar" dialog for more information.
( More at > Create Button command >> viewtopic.php?p=344777#p344777 )

Or as User-Defined Command:
To an User-Defined Command you can assign an keyboard shortcut, to an button you can not.
* "Configuration > Button Bar..."
* In the "Change button bar" dialog, click "Add"
Tip: Press F1 key while in "Change button bar" dialog for more information.
* click magnifying glass icon
* choose usercmd.ini from left listview
* on the bottom click at [New]
* enter name like 'em_MyCommandName' (the "em_" -part is mandatory!)
* click on OK
* select an existing command via the 'magnifying glass' symbol
or type in the properties as shown above for an button.
( More at > User-Defined Command >> viewtopic.php?p=344803#p344803 )

To assign an keyboard shortcut to an internal CM_ or an UserDefined EM_ Comamnd:
Utilize "Configuration > Options > Misc. >>> Redefine hotkeys (Keyboard remapping)".
* choose an "Hotkey" combo
* click on the magnifying glass and choose an command
* apply with the green check mark button!!!
* [OK], [OK]
( More at > Add keyboard shortcut to commands >> viewtopic.php?p=388478#p388478 )

Read on:
Create your own User-Defined Command >>> viewtopic.php?p=344803#p344803
Create your own Button command >>> >>> > viewtopic.php?p=344777#p344777
Add keyboard shortcut to commands >>> >> viewtopic.php?p=388478#p388478
TCs' internal commands - how-to find and use them > viewtopic.php?p=289931#p289931
How to process all files in a folder (ForEachSelectedFileDo... .vbs) > viewtopic.php?p=355257#p355257
More Tips & Tricks collection >>> >>> >> viewtopic.php?f=3&t=52425

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional tip / explanation:

An UDC is stored in usercmd.ini in TC folder

cmd= the Command
param= the Parameters
path= the Start path
menu= the tooltip
button= the Icon file
iconic= the visibility settings ("1 = minimized" // "-1 = maximized" // "0 or missed = default")
< If cmd points to another button bar (a subbar) then iconic=1 means "Show as menu" >

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Additional tip / explanation:

Interchangeable TC-Button code (TOTALCMD#BAR#DATA)

A text block starting with TOTALCMD#BAR#DATA till an ending number, is the code for an interchangeable TC-Button.
-- Copy the code > right click the TC button bar > Chose "Paste".
-- Or: right click an button in the TC button bar > Chose "Copy" > Paste to forum.

Icon file
Tooltip if any
Start path if any
Visibility settings if any
Number of the internal command, else '-1'

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Total Commander is fully portable

The main steps to do this are
-- adding "UseIniInProgramDir=7" below of "[Configuration]" in wincmd.ini.
Save that INI in TC-folder, you will need write access to that folder.
(you can check in "Help - About TC" where the INI is currently located)

-- and using %Commander_Path% everywhere for your commands and in your wincmd.ini
(See http://www.ghisler.ch/wiki/index.php/Navigation >> Pseudo environment variables)
( More at > https://www.ghisler.ch/board/viewtopic.php?f=3&t=41760&p=292844#p292844 )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Post Reply