FAQs: Summary - Tipps & Tricks collection

English support forum

Moderators: sheep, Hacker, Stefan2, white

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

FAQs: Summary - Tipps & Tricks collection

Post by *Stefan2 »

Deutsche FAQs >>> FAQs: Übersicht - Tipps & Tricks Sammlung >>> https://ghisler.ch/board/viewtopic.php?f=2&t=52423
English FAQs >>> FAQs: Summary - Tips & Tricks collection (this page here / diese Seite hier) >>> https://ghisler.ch/board/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
TOTALCMD.CHM , MENU Help, F1-key
History.txt > https://www.ghisler.com/history.txt
Wiki > https://www.ghisler.ch/wiki/index.php/Main_Page
Forum > Total Commander (English) >> https://ghisler.ch/board/viewforum.php?f=3



FAQs: Total Commander is fully portable / UseIniInProgramDir=7
viewtopic.php?f=3&t=41760&p=292844#p292844

FAQs: Silent Installation // Automatic deployment
https://ghisler.ch/board/viewtopic.php?p=386696#p386696

FAQs: TC 9.50 - Tips & Tricks for new user, first settings // Update // Backup
https://ghisler.ch/board/viewtopic.php?f=3&t=54260&p=360199#p360199

Wiki: What to backup? These are the files you need to backup
https://www.ghisler.ch/wiki/index.php?title=Backup

Windows x64: Explorer vs TC: Content of System32 folder is different
https://ghisler.ch/board/viewtopic.php?f=3&t=25743

FAQs: How to create an button / Icons / Variables / Quoting
https://ghisler.ch/board/viewtopic.php?p=344803#p344803

FAQs: Button-code: How-to Copy Share Paste a button ('TOTALCMD#BAR#DATA')
https://ghisler.ch/board/viewtopic.php?p=335879#p335879

FAQs: Button - How to execute more than one command at once
https://ghisler.ch/board/viewtopic.php?p=287794#p287794

FAQs: User-Defined Command (UDC) (usercmd.ini) em_command
- Create own commands to use in button or to execute them by an keyboard shortcut.
https://ghisler.ch/board/viewtopic.php?p=344777#p344777

FAQs: Add keyboard shortcut Hotkey to em_ or cm_ commands
https://ghisler.ch/board/viewtopic.php?p=388478#p388478

FAQs: TCs' internal commands - how-to find and use them
https://ghisler.ch/board/viewtopic.php?p=289931#p289931

How to create a button to ..process.. all files in a folder (ForEachSelectedFileDo... vbs)
https://ghisler.ch/board/viewtopic.php?p=355257#p355257

FAQs: automate/script TC with AutoHotkey AHK
https://ghisler.ch/board/viewtopic.php?p=350976#p350976

TC9: "Send WM_USER+50 with wparam" - how-to? (Just some basic examples with AutoHotkey AHK)
https://ghisler.ch/board/viewtopic.php?t=44451

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.
https://ghisler.ch/board/viewtopic.php?p=323981#p323981

was FAQs: MULTIRENAME LOAD: Multi-rename tool default setting MRT F2 save
FAQs: Multi-rename tool (MRT) / Save+Load template (MULTIRENAME) / Default setting (MultiRenameLoadSettings)
https://ghisler.ch/board/viewtopic.php?p=347067#p347067

FAQs: INI-History - Clear remove delete drop / INI Redirect Section
https://ghisler.ch/board/viewtopic.php?p=288071#p288071

Custom columns / User defiened view / Show file details
http://www.ghisler.ch/wiki/index.php/Custom_columns

FAQs: Create a user defined 'Custom Column'
https://ghisler.ch/board/viewtopic.php?p=351792#p351792

FAQs: PLUGINs - Find / Installing / Removing a plugin:
https://ghisler.ch/board/viewtopic.php?p=294671#p294671

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
https://ghisler.ch/board/viewtopic.php?p=384511#p384511

FAQs: Color highlight a file (or folder) by any of its properties
https://ghisler.ch/board/viewtopic.php?p=352014#p352014

FAQs: How to start TC in privileged mode when Windows starts / Run As Admin / admin rights / startup / Autostart / RunAsAdmin / RunAs Admin
https://ghisler.ch/board/viewtopic.php?p=353259#p353259

FAQs: How to register Total Commander with a license key
https://ghisler.ch/board/viewtopic.php?p=348877#p348877

FAQs: File comments / descript.ion / descriptions / Ctrl+Z / files.bbs / bytes 04 C3 82
https://ghisler.ch/board/viewtopic.php?p=355053#p355053



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


Everything integration in TC , petermad
https://ghisler.ch/board/viewtopic.php?f=3&t=55496



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
https://ghisler.ch/board/viewtopic.php?f=3&t=53559


- - -

Menu "Files - Change attributes" > Set writedate Date/Time attributes from parts of filename
https://ghisler.ch/board/viewtopic.php?p=366911#p366911


- - -


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
https://ghisler.ch/board/viewtopic.php?t=48019

- - -

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

viewtopic.php?t=1853
http://lefteous.de/tc/archives/lst2clip/lst2clip_1_02.zip
https://totalcmd.net/plugring/list2clip.html


- - -

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

1. Get the free tool ShellExView:
http://www.nirsoft.net/utils/shexview.html
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


- - -


Find me:

Now something completely different: https://www.youtube.com/watch?v=ObbAc4WaAq4

User avatar
Stefan2
Power Member
Power Member
Posts: 2877
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) >> https://ghisler.ch/board/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 >> https://ghisler.ch/board/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 >> https://ghisler.ch/board/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 >> https://ghisler.ch/board/viewtopic.php?p=388478#p388478 )


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


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

Additional tip / explanation:

An UDC is stored in usercmd.ini in TC folder

[em_MyCommandName]
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.

Explanation:
----------
TOTALCMD#BAR#DATA
Command
Parameters
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 > viewtopic.php?f=3&t=41760&p=292844#p292844 )

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



 

Post Reply