Generic how-to's Collection / Allgemeine Fragen Sammlung

English support forum

Moderators: white, Hacker, petermad, Stefan2

Locked
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Generic how-to's Collection / Allgemeine Fragen Sammlung

Post by *Stefan2 »

I just want to have a place to collect some generic FAQs of mine or from others I found.
This way I don't have to rethink this faqs over and over again but can just link a post from here. And this is even "in the cloud" and always with me :D
(Utilizing a thread in the forum I find more nifty for my use than logging into the wiki)

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

This is a answers-only, no-questions how-to thread. Don't post questions, post here how-tos' only.

Please feel free to post your how tos' here too.     But no questions here. Only answers please.    

If you like you can share your expression in that other thread > http://ghisler.ch/board/viewtopic.php?t=40959

If you god question please search the forum, and if you find nothing, create a new thread/topic.
Please see the forum rules on top of each sub forum too, thank you.


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

More information and how-tos' can befound in the Wiki: http://www.ghisler.ch/wiki/index.php/Main_Page

Topics

About Total Commander: History, Screenshots, Files, etc...
FAQ - Frequently asked questions.
Known bugs and workarounds
Known version-lasting bugs without workaround
Tutorials - Step by step instructions for certain tasks.
List of internal functions - Functions that work out of the box.
Plugins expanding the functionality.
List of 64-bit plugins and addons
Useful tools to be used with Total Commander
Configuration: Adapt Total Commander.
Look and Feel modifications.
Community portal - Links to Total Commander related websites, forums, etc.
Developer's corner - Information for addons/plugins developers.
Ideas and suggestions
http://www.ghisler.ch/wiki/index.php/Ini-settings


Also the HISTORY.txt and the Forum are great source of Information, as many is mentioned only there.


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

Mehr Informationen und Anleitungen findet Ihr im Wiki: http://www.ghisler.ch/wikide/index.php/Hauptseite

Verfügbare Kategorien

Über Total Commander: Geschichte, Bildschirmfotos, Dateien, etc...
FAQ: Häufig gestellte Fragen
Bekannte Fehler und Behelfslösungen
Anleitungen: Schritt für Schritt Anleitungen für bestimmte Aufgaben
Interne Funktionen die zum Basispaket gehören.
Plugins erweitern die Funktionalität
Liste von 64bit PlugIns für den TC64
Nützliche Werkzeuge zur Benutzung mit dem Total Commander
Konfiguration: Total Commander anpassen
Tc32/Tc64 Konfiguration: "RedirectSection" und "PROCESSOR_ARCHITECTURE"
Look and Feel Modifikationen
Weblinks zu Seiten die irgendwie mit Total Commander zusammenhängen
Ideen und Vorschläge im Überblick: Funktionen, die Total Commander noch nicht hat.
http://www.ghisler.ch/wikide/index.php/Ini-Einstellungen


Auch die HISTORY.txt und das Forum sind voll mit Informationen, vieles wurde nur dort erklärt.


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


Old Tutorial from User Clo (Claude Charries †)
e.g. here: http://marmouset.atspace.com/helptc/
Last update: September, 25, 2009.



 
Last edited by Stefan2 on 2017-04-10, 11:55 UTC, edited 6 times in total.
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Button bar: Create Erstelle Button / Wechsle Buttonbar

Post by *Stefan2 »

This is a answers-only, no-questions how-to thread. Don't post questions, post here how-tos' only.

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


Buttonbar

How to create an button

Right click on the button bar at the top and select "Change..."
In the "Change button bar" dialog, click "Add", then fill in the properties as follows:

Code: Select all

Command    = <your application with full or relative path, or a TC EM_ or CM_ command>
Parameters = <parameters for your application, e.g. TCs parameter (press F1 key for help)>
Start path = <if need, or leave empty>
Icon file  = <e.g.: %commander_path%\WCMICONS.DLL>
Tooltip    = <a hint for you, so you still know next week what this button do.| Use a pipe symbol to insert a line break>

Enable "[_]Run minimized" or Run maximized, if wanted
Then click OK to create the button.


Note: you do not need to take care on and fill out all fields. "Command" is mandatory, "Icon" too, else the button is not visible. "Parameters" only if need.

Visible Command options:
Command: '-1' insert an separator between two buttons (an free space, and with option '[x]Flat Icons' a pipe-like symbol '|')
Command: '-2' insert a line break in button bar to get two rows.
ghisler(Author) wrote:the button bar auto-wraps when it becomes too wide
ghisler(Author) wrote:Total Commander 7.5 will support both a user-defined line break in the bar (command: -2)
and an unlimited number of lines!
https://www.ghisler.ch/board/viewtopic.php?p=144991#144991



While button is open for modification, press F1-key for more help.
....
...
%P causes the source path to be inserted into the command line, including a backslash (\) at the end.
%N places the filename under the cursor into the command line.
%T inserts the current target path. Especially useful for packers.
%M places the current filename in the target directory into the command line.
%O places the current filename without extension into the command line.
%E places the current extension (without leading period) into the command line.
%S insert the names of all selected files into the command line. Names containing spaces will be surrounded by double quotes.
Please note the maximum command line length of 32767 characters.
%S10 insert the names of the first 10 selected files (max.) into the command line.
Allows to limit the number of file names passed to the program. You can use any other number.
%P%S insert the names of all selected files into the command line, with full path. Names containing spaces will be surrounded by double quotes.
Do NOT put quotes around %P%S yourself!
...
%L, %l, %F, %f, %D, %d, %WL, %WF, %UL, %UF create a list file in the TEMP directory
with the names of the selected files and directories,
and appends the name of the list file to the command line.
...
%L Long file names including the complete path, e.g. c:\Program Files\Long name.exe
%F Long file names without path, e.g. Long name.exe
...
%UL, %UF like %L and %F, but with a UTF-8 Unicode list file (with byte order marker)
%WL, %WF like %L and %F, but with a UTF-16 Unicode list file (with byte order marker)
...
....

Note: you can use environment variables (like "%WinDir%" or "%Commander_Path%") in the Command field only.
You cannot use environment variables in "parameters" because they collide with placeholders like %P%N.


You could use environment variables in Parameter field too, but only, if you would use "COMSPEC" as commando,
like: %COMSPEC% /c start "" "%COMMANDER_PATH%\ADDONS\TCMENU.EXE"
-or-
like: cmd /c start "" "%COMMANDER_PATH%\ADDONS\TCMENU.EXE"
(Note the empty quote pair after start, that are for an emtpy title. See START /? help for more)
But than you have to double percent signs in Parameters field too: "%%APPDATA%%\GHISLER\windows.bar"
Example:

Code: Select all

Command=%ComSpec%
Parameters=/c ""X:\Path\To\xsltproc.exe" --output "%P%O (out).%E" --novalid %%COMMANDER_DRIVE%%\XSLT\my_transform.xsl "%P%O.%E""

TCs paramter like %N %N %T etc. can normaly be use in Parameter field only.
But you can put parameters in "command" input box if you use double quotes correctly, e.g.
"%COMMANDER_Path%\Program name" "%COMMANDER_DRIVE% and other stuff" other_parameter

Also try double percent signs:
Command=cmd /c
Parameters=Start "" "%%Commander_Path%%\Tools\Notepad2.exe" %P%N
(Please note that TC will quote %P%N himself, so don't quote them by yourself)




Often you would just call a DOS batch or a VBS script and send the TCs paramter as arguments:

Command: cmd /k %COMMANDER_DRIVE%\XML\xslt\style-transform.cmd %COMMANDER_DRIVE%
Parameter: "%P%N"

style-transform.cmd batch (%COMMANDER_DRIVE%\XML\xslt\style-transform.cmd)

Code: Select all

@echo off
set uri=%2
set uri=%2:\=/%
set xslt=%1\XML\xslt\style-transform.xslt
set xslt=%xslt:\=/%

%1\java\jre\bin\java.exe -cp %1\SaxonHE9\saxon9he.jar net.sf.saxon.Transform -xsl:%xslt% -u jar:file:///%uri%!/word/document.xml -o:%~n2.xml
%1 ==> %COMMANDER_DRIVE%
%2 ==> %P%N (the selected file incl. path)



Deutsch: %L und andere Platzhalter werden nur im Feld "Parameter" ersetzt.
Dafür werden im Feld "Befehl" Umgebungsvariablen unterstützt.
Beides geht leider nicht, das könnte zu nicht eindeutigen Situationen führen,
etwa %P%N -> Ersetzen von %P% durch Umgebungsvariable P statt %P durch Pfad.
ghisler(Author)


Note: you can also drag&drop a application.exe on the buttonbar to create a new button.
Next right click the new button and chose "Modify" to set it up correctly.


- - -

User who read this explanation also read the following posts below:


-- How to find and use TCs' internal command
-- TCs' user commands (em_xxxxx)
-- Add shortcut key to em_ or cm_ commands



- - -

How to create an button by drag&drop

You also can create an Button by drag & dropping an executable (exe/vbs/ahk/etc....) onto the button bar.

Next right click on that button and choose "Change...".

Read more in the section above ^^^^^^


- - -


TOTALCMD#BAR#DATA

You can also create new buttons by copy and paste an existend button
or by pasting an button code, provided in the forum, like:

Code: Select all

TOTALCMD#BAR#DATA
cmd /c
for /f "tokens=*" %%D in ('type %F') do @md "%%~nD"
C:\Windows\system32\cmd.exe
Create Folder from Files


-1 

Copy that code, right click on the button bar, chose "Paste", done.


Explanation:

Line 1: let TC detect his own code in clipboard
Line 2: the commando
Line 3: the parameters (leading ‘?’ will show you the command before actual executing
Line 4: path to icon file
Line 5: tooltip
Line 6: default start path
Line 7: app window parameter: minimized /maximized (usercmd.ini: iconic)
Line 8: number of the TC internal command, if any in line 2. Else ‘-1’ for other commands.



---


viewtopic.php?p=335674#335674

Erklärung zu TOTALCMD#BAR#DATA


Dies ist der Code für einen Total Commander-Button/Knopf
zwecks Austausch zwischen Anwendern über das Forum:

Code: Select all

TOTALCMD#BAR#DATA
cmd /k
?ECHO %P%N %T%M 
C:\Windows\system32\cmd.exe
Hier eine |kurze Erklärung|als Tooltip


-1
Erklärung:

Zeile 1: dadurch kann der TC diesen Code in der Zwischenablage erkennen und den 'Einfügen'-Eintrag im Button-Kontextmenü einblenden.
Zeile 2: Der Befehl / das Kommando
Zeile 3: Die Parameter zum Befehl (das führende '?' bewirkt, dass das Kommando beim Ausführen erstmal angezeigt wird)
Zeile 4: Pfad zur Datei des Icons
Zeile 5: Der Tooltip
Zeile 6: Der Startpfad
Zeile 7: Aufrufparameter minimized Als Symbol /maximized maximiert (usercmd.ini: iconic)
Zeile 8: Die Nummer des internen TC-Befehls falls Zeile 2 einen solchen beinhaltet, ansonsten '-1' bei anderen Befehlen.


Anwenden dieses Codes:
- den Code markieren > in die Zwischenablage kopieren > rechts Klick auf die Buttonbar am gewünschten Platz > "Einfügen" auswählen.


Weitere Hilfe:
Drücke im geöffneten Button-Dialog (rechts Klick auf die Buttonbar > Ändern...) die F1-Taste um die Hilfe zu den Parameter zu lesen.

Klicke dort auf das Lupen-Symbol Icon um eine Liste der TC-internen Befehle zu sehen.




- - -

Some information from the wiki:
The Button bar

With the button bar you can call menu commands, external programs and even other button bars.
If you leave the mouse cursor on a button for a moment, a small window with a description will appear( if you haven't deactivated it in Help texts).

You can easily add buttons to the button bar using Drag&Drop (with pressed SHIFT key).
By pressing the right mouse button, you can open a local menu, which allows to change or delete buttons.
For further changes in the button bar you should use the Dialog box to change the whole button bar.
Read more at >>> http://www.ghisler.ch/wiki/index.php/Buttonbar
Mit der Buttonbar lassen sich Menübefehle, externe Programme sowie weitere Buttonbars aufrufen.
Lässt man den Mauscursor einen Moment auf einem Button stehen, so erscheint eine Erklärung (sofern dies nicht unter Optionen deaktiviert wurde).

Die Buttonbar lässt sich durch einfaches Drag&Drop (bei gedrückter Umsch-Taste) einfach erweitern.
Mit der rechten Maustaste öffnen Sie ein lokales Menü, mit dessen Hilfe Sie einfach Buttons ändern bzw. löschen oder auch kopieren können.
Für weitergehende Änderungen am Buttonbar empfiehlt sich die Verwendung der Dialogbox zum Ändern der ganzen Buttonbar.
Mehr Infos >>> http://www.ghisler.ch/wikide/index.php/Buttonbar


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

Buttonbar wechseln ToDo bzw. wip
Buttonbar wechseln
Haupt-Buttonbar ändern
Umschalten zwischen Buttonbars
http://www.ghisler.ch/wikide/index.php/Buttonbar_wechseln




- - -

Mehrere Buttonbars anlegen und zwischen denen umschalten:

TC speichert die Buttonbar-Einstellungen in einer Textdatei mit Endung 'BAR'
Standardmäßig heißst die ("Haupt-buttonbar") Datei 'DEFAULT.BAR', man kann diese aber nennen wie man möchte.


Welche Datei genommen wird steht in der wincmd.ini (falls abweichend vom Standard)
unter '[Buttonbar]' und 'Buttonbar='
(INFO: die '*.br2'-Dateien sind cache der Icons)

Bei mir steht dort:
Buttonbar=%commander_path%\plugins\BARs\Menu01.BAR



Meine 'Menu01.BAR' ist im einfachsten Fall eine Kopie der 'DEFAULT.BAR'

Aber der erste Button dieser 'Menu01.BAR' verweist auf die selbe 'Menu01.BAR'
Der zweite Button verweist auf eine 'Menu02.bar'
Der Dritte auf '%Commander_Path%\plugins\BARs\Menu03.bar', u.s.w.

Die anderen Bars' haben die selben ersten Buttons.
Dadurch kann man von jeder Bar auf eine andere Bar umschalten.
(Extra Tipp: die jeweilige Bar verweist für ihren eigenen Button auf ein etwas
andersfarbige Icon, welches den Eindruck eines gedrückten Zustands vermittelt)



In der *.bar-Datei sieht das in etwa so aus:
[Buttonbar]
Buttoncount=72
button1=%Commander_Path%\plugins\BARs\Menu01-Gedrueckt.ico
cmd1=%Commander_Path%\plugins\BARs\Menu01.bar
iconic1=0
menu1=Menu01 - Main
button2=%Commander_Path%\plugins\BARs\Menu02.ico
cmd2=%Commander_Path%\plugins\BARs\Menu02.bar
iconic2=0
menu2=Menu02 - Special tools
button3=%Commander_Path%\plugins\BARs\Menu03.ico
cmd3=%Commander_Path%\plugins\BARs\Menu03.bar
iconic3=0
menu3=Menu03 - Work
button4=%Commander_Path%\plugins\BARs\Menu04.ico
cmd4=%Commander_Path%\plugins\BARs\Menu04.bar


Die *.bar-Dateien sind reine Textdateien und können "von Hand" editiert werden.

Für einen Weg über das Menü siehe das Wiki: http://www.ghisler.ch/wikide/index.php/Buttonbar_wechseln


Das Tool 'Nested Button Bar Creator 2.00' erleichter die Erstellung und spendiert die nötigen Buttons.
http://utceditors.totalcmd.net/tc_tools/nested_button_bar_creator/overview.htm
http://utceditors.totalcmd.net/tc_tools/nested_button_bar_creator/overview_de.htm
http://ghisler.ch/board/viewtopic.php?t=8829
http://totalcmd.net/plugring/bar_creator.html










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


Button as Drop-Down Menu

http://ghisler.ch/board/viewtopic.php?p=215709#215709
ts4242 Power Member Posted: Tue Jan 18, 2011 7:54
1- Right click on empty part in button bar and choose "Change..."
2- On Change button bar dialog press Add button.
3- Press Change >> button and select Add subbar from the menu
4- In open dialog type new file name
5- TC will open another Change button bar dialog, add your favorite programs.
6- Before closing this dialog check the option "Show as menu"




http://ghisler.ch/board/viewtopic.php?p=216387#216387
petermad Power Member Posted: Sun Jan 30, 2011 15:13
To make for example a subbar for your graphics programs do the following:

1. Open your main button bar in the "Change button bar" dialog by right clicking on the empty area
at the end of the button bar, or using the menu: "Configuration" -> "Button Bar...".

2. Add a new button by cliking the "Add" button.
3. Press the button marked "Change >>" and choose "Add Subbar >>".

4. Write for example graphics.bar as the File name in the Browse dialog and click OK.
- You are not bound to create a dummy *.bar file prior !
- Just state a new (non-existing yet) name in the upper field of the Add sub-bar dialogue, and TC'll create the file !

5. Now a second "Change button bar" dialog window is opened with a new bar file called graphics.bar.
6. Add your graphic programs one by one to that new bar and click OK when you are finished.
7. Now you are back to the dialog with you main button bar, and in the right side of the dialog
there will now be an option "Show as menu" that you can select. That option is ONLY visible
when the Command field has a *.bar file in it. Select it and click OK

If you click the new button, the subbar with the graphics will open as a menu. If you Shift+click the new button
it will replace the main button bar - use the first button to get back to your main button bar again.



Balderstrom Power Member Posted: Sun Jan 30, 2011 20:16

As far as what petermad was talking about,
Here's an example of a very simple button bar:

Command: %TCData%\GUI\ToolBars\PackUnpack.bar
IconFile: %TCData%\GUI\Icons\mwmMix0510.icl
NOTE: Make sure you tick: [v] Show as a menu

Contents of "PackUnpack.bar"
[Buttonbar]
Buttoncount=3
button1=%TCDATA%\GUI\Icons\mwmMix0510.icl,56
cmd1=cm_PackFiles
iconic1=1
menu1=(+) Pack ++
button2=
iconic2=0
button3=%TC%\wcmIcons.dll,31
cmd3=cm_UnpackFiles
iconic3=1
menu3=Unpack

When you click on that button - that is on your main button bar a drop down menu will be shown. There is also a wincmd.ini setting:

Code: Select all

[Buttonbar]
PopupIconSize=24	
If you shift click on that icon, it will replace your main-button bar with the contents of that "sub" button-bar.
You can as well add as the first (or last) item a "switch" button that activates your main button bar.
that button will NOT be shown when the button-bar is displayed as a list/drop down menu.

What all this _doesn't_ do, is it is not layed out like a Grid (opera-speeddial like). It is just a drop-down menu with icons.



MVV Power Member Posted: Wed Jan 19, 2011 10:19
Yes, you can't drag items directly to subbar, but if you click menu button while Shift is down,
TC will open this subbar as usual buttonbar - so you will be able to drag items to it.
Then you may click first buttonbar button Go back (TC always creates this button for new bars) to return to main buttonbar.


- - -

Third party tools

MGP Software >>> http://www.mgpsoft.net/Downloads/
TCmenu19.zip >>> http://www.mgpsoft.net/Downloads/TCmenu.jpg
TCToolbar14.zip >> http://www.mgpsoft.net/Downloads/TCToolbar.jpg

http://ghisler.ch/board/viewtopic.php?t=738
http://ghisler.ch/board/viewtopic.php?p=52917#52917[quote]TCMenu shows buttonbar file as pulldown menu.
TCToolbar shows buttonbar file as secondary temporarily toolbar.[/quote]


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

Icon Resources to use as Button icon

On default, put "%Commander_Path%\WCMICONS.DLL"
in the Icon file box, press TAB-key and choose an Icon.


But there are many more Icon libraries on your computer.


For an reference go to: https://diymediahome.org/windows-icons-reference-list-with-details-locations-images/

They have a nice, full list of available Icons:
%windir%\system32\compstui.dll (Common Property Sheet User Interface)
%windir%\system32\ddores.dll (Device Category Information and Resources)
%windir%\system32\ieframe.dll (Internet Explorer)
%windir%\system32\imageres.dll (Windows Image Resource)
%windir%\system32\mmcndmgr.dll (Microsoft Management Console Node Manager)
%windir%\system32\MORICONS.DLL (Windows NT Setup Icon Resources)
%windir%\system32\netshell.dll (Network Connections Shell)
%windir%\system32\pnidui.dll (Network System Icons)
%windir%\system32\shell32.dll (Windows Shell Common)
%windir%\system32\wmploc.dll (Windows Media Player Resources)
%windir%\system32\pifmgr.dll (Windows NT PIF Manager Icon Resource Library)
%windir%\system32\wpdshext.dll (Portable Devices Shell Extension)
%windir%\system32\comres.dll (COM -Ressourcen)
%windir%\system32\dmdskres.dll (Disk Management Support Snap-In)
%windir%\system32\Dsuiext.dll (Directory Service Common UI)
%windir%\system32\inetcplc.dll (Internet Control Panel)
%windir%\system32\mstscax.dll (Remote Desktop Services ActiveX Client)
%windir%\system32\setupapi.dll (Windows Setup API)
%windir%\system32\shdocvw.dll (Shell Doc Object and Control Library)
%windir%\system32\urlmon.dll (OLE32\Extension for Win32)
%windir%\system32\wiashext.dll (Imaging Devices Shell Folder UI)
%windir%\system32\mmres.dll (General Audio Resources)


Put the path to such DLL into the Icon file box,
press TAB-key and choose an Icon.

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


Some of many thousend related forum posts (search the forum for more)


Sync-Aufgabe als Button anlegen, geht das?
Kommando: %COMMANDER_EXE%
Parameter: /S=S:= D:\ I:\
Startpfad: %COMMANDER_PATH%
Icondatei: TOTALCMD.EXE
viewtopic.php?t=43435


Oft gebrauchte Verzeichnisse als Button anlegen?
Mappe verbinde Ordner als Laufwerk buchstaben SUBST NET USE
viewtopic.php?t=48075


Textdatei mit Button anlegen u. automatisch öffnen m. Editor
Kommando: cmd
Parameter: /c chcp 1252 & cmd /c echo %P>"_my file.txt"&& START "" "%%COMMANDER_PATH%%\Tools\Notepad2.exe" /l 2 "_my file.txt"
Startpfad: leer (blank)
Icondatei: %COMMANDER_PATH%\Tools\Notepad2.exe
Tooltip: Textdatei (_my file.txt) im aktuellen Ordner erzeugen MIT Pfad in Textzeile Nr. 1
viewtopic.php?t=47391


Suchen per Button sofort starten
Suche so einstellen wie gewünscht und abspeichern in der Registerkarte "Laden/Speichern", beispielsweise als "Hans_Willi".
Dann im TC einen neuen Button anlegen mit dem Kommando "LOADSEARCH Hans_Willi".
-oder-: totalcmd.exe /O /S=F:Hans Willi.
viewtopic.php?p=290037#290037


Button anlegen: Sprung zu Links=C: Rechts=D:
c:\totalcmd\TOTALCMD64.EXE /O /L=c:\ /R="d:\
-oder-: OPENTABS myTabfile.tab
viewtopic.php?t=40785


Dateiliste filtern
Kommando: CD >MeineFilter
viewtopic.php?p=332759#332759


Button für "Hinzufügen zur Media Player Classic Playlist"
Kommando: C:\Pfad\zu\MPC-HC.exe
Parameter: /open /add "%P%O.%E"
viewtopic.php?t=39514


Button zum Automatischen erstellen von Ordnern?
Kommando: cmd.exe
Parameter: /k chcp 1252 & for /f "usebackq delims=" %%i in (%P%N) do @echo "%%i"
viewtopic.php?t=34248


Help in parameters of button bar
Command: %COMMANDER_PATH%\Tools\MyBatch.cmd
Parameters: "%F" "%P" "%T"
viewtopic.php?p=285726#285726


User command to pass two file names to external executable
P%S %T%R
%P%S2
viewtopic.php?p=325378#325378


"New text file" (possibly unicode enc.) on button
CMD = cmd /c
PARAM = ?COPY "%Commander_PATH%\ShellNew\unicode.txt" "_newfile.txt"
viewtopic.php?p=323723#323723


Script for many selected files
Command: "path2script\PowerISOCreate.vbs"
Parameters: "%T" "%L"
viewtopic.php?p=321729#321729



How to create multiple folders at once? 1..50
CMD: PowerShell -NoProfile -NoExit
viewtopic.php?p=321343#321343


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

Links to other posts:

A basic button bar menu demo
viewtopic.php?t=22857







--------------------------------------------------------------
Finde mich:
Find me:
Last edited by Stefan2 on 2018-05-28, 07:22 UTC, edited 16 times in total.
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

TCs' Benutzer definierte Befehle (BDB) (em_xxxxx) UserCmd.ini user defined commands (UDC)

Post by *Stefan2 »

TCs' Benutzer definierte Befehle / Eigene Befehle / Erweiterte Befehle (em_xxxxx)


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

DEUTSCH

Als Alternative zu den TC internen “cm_irgendwas” Kommandos,
(siehe TOTALCMD.INC -Datei im TC-Ordner: cm_RightBySize, cm_RenameOnly, cm_CompareDirs,...)
kannst du auch eigene Anwenderbefehle, “em_irgendwas”, erstellen.
(z.B.: em_Rechner, em_StarteAHKprogramm, em_RunNotepad, em_OpenTCFolder, em_GoToMyHome)

Um eigene Befehle zu erstellen, folge einem dieser beiden Möglichkeiten.


Möglichkeit 1, manuelle Erstellung durch editieren der „usercmd.ini“

Merke 1: die usercmd.ini befindet sich immer im Ordner mit der wincmd.ini. (Siehe Hilfe-Menü > Über TC > Pfade)
Merke 2: falls keine usercmd.ini vorhanden ist, erstelle eine normale Textdatei mit diesem Namen.

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

Code: Select all

[em_MyCommandName] 

cmd= <kompletter oder relativer Pfad zum gewünschten Programm> 

param= <Parameters zu deinem Programm, bzw. TC-interne Parameter wie zB %P %N %T %L %F %S .....> 

path= < working directory> 

menu= < "tooltip”> 

button= <Icondatei> 

iconic= < "=1" run minimized, else "=0" run normal mode and visible> 
-----------------------------

Tipp: öffne einen existierenden Button per Rechtsklick, dann drücke die F1-Taste und lies weiter.

Tipp: Umgebungsvariablen wie %APPDATA% werden im Parameterfeld nicht aufgelöst.
Umgebungsvariablen gehen nur im Feld "Kommando".
(Außer mittels dem Kommando comspec und vars in doppelten Prozentzeichen als Parameter)


Beispiel
totalcmd\usercmd.ini wrote:[em_Rechner]
cmd=calc.exe

[em_StarteAHKprogramm]
cmd=%Commander_Path%\MyTools\AHK\AutoHotkey.exe
param=%P%O.ahk

[em_RunNotepad]
cmd=notepad

[em_OpenTCFolder]
cmd=explorer %Commander_Path%

[em_GoToMyHome]
cmd= CD %USERPROFILE%\My Documents

[em_ReNamer]
cmd=%Commander_Path%\MyTools\ReNamer\ReNamer.exe
Param=/list "%L"

[em_CopyBasenameToClip]
cmd=%comspec% /c
param=del %%tmp%%\tctmp & for /f "tokens=*" %%B in ('dir /b %S') do @echo %%~nB >> %%tmp%%\tctmp & type %%tmp%%\tctmp |clip
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Möglichkeit 2, über den Dialog


Buttonbar > rechte Maustaste > "Ändern..."
Im Button-Dialog auf das [Lupensymbol] klicken
(oder cm_CommandBrowser in die TC-Befehlszeile eingeben)

Links, die Kategorie "usercmd.ini" auswählen
(Falls dort keine usercmd.ini existiert, erstelle eine Datei mit diesem Namen im TC-Ordner)
Unten, auf Button [Neu] klicken

Name für den benutzerdefinierten Befehl eingeben, z.B. [ em_MeinErstesUDC ] (das "em_" muss sein!)
Auf Button [OK] klicken

Eigenschaften für den Befehl eingeben.
z.B.:
    Kommando: Notepad
    Parameter: "%O.txt"
    Startpfad:
    Icondatei; Notepad
    Icon:
    Tooltip: Erstelle Textdatei mit Namen unter Cursor.

Den Dialog mit [OK] schließen.
Den Befehlsbrowser mit [OK] schließen.
(Den Button-Dialog mit [OK] schließen, falls geöffnet)

Fertig.

Mehr unter > http://www.ghisler.ch/wikide/index.php/Benutzerdefinierte_Befehle




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


Weise einem Befehl (em_ oder cm_) ein Tastaturkürzel zu

Öffne „Konfigurieren > Einstellungen > Diverses“
* Bei Tastaturkürzel wähle eine freie Kombination
* Klicke auf das Vergrößerungsglas um ein Kommando auszusuchen
* Tippe em_ (oder cm_) zum filtern und wähle das gewünschte Kommando (z.B.: em_Rechner)
* Schließe den Einstellungsdialog mit [OK]
* Noch einmal [OK] und Fertig.

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


Ein paar Anmerkungen, gefunden im Forum
FRAGE:
Kommando: %COMMANDER_PATH%\ADDONS\TCMENU.EXE
Parameter: %APPDATA%\GHISLER\windows.bar
Leider bekomme ich %APPDATA%, als Parameter für den TCmenu Aufruf, vom TC nicht expandiert. Geht das und wie?

ANTWORT:
Nein, geht nicht.
Umgebungsvariablen wie %APPDATA% werden im Parameterfeld nicht aufgelöst um Verwechslungen mit den internen Platzhaltern ( z.B. %P%N ) zu vermeiden

Umgebungsvariablen gehen nur im Feld "Kommando".

Verschiebe die Parameter von Parameter nach Kommando. z.B.
Kommando: %COMMANDER_PATH%\ADDONS\TCMENU.EXE %APPDATA%\GHISLER\windows.bar
Parameter: <leer>

Falls %COMMANDER_PATH% oder %APPDATA% Leerzeichen enthält, müssen Sie noch doppelte Anführungszeichen verwenden:
Kommando: "%COMMANDER_PATH%\ADDONS\TCMENU.EXE" "%APPDATA%\GHISLER\windows.bar"
Parameter: <leer>

Eine Alternative wäre eventuell ein Umweg über COMSPEC.
Prozentzeichen in "Parameter" müssen dabei verdoppelt werden, damit der Kommandointerpreter die Variablen erweitert:

Kommando : %COMSPEC% /c start "" "%COMMANDER_PATH%\ADDONS\TCMENU.EXE"
Parameter: "%%APPDATA%%\GHISLER\windows.bar"

tuska Posted: Tue Oct 20, 2015 22:44 Post subject: Datei per Email senden - Shortcut
http://ghisler.ch/board/viewtopic.php?t=40130

- em_ User-Kommando erstellen:

1. Rechtsklick auf einen freien Platz neben der Symbolleiste > auf "Ändern" drücken
2. Button "Anfügen" drücken
3. Klick auf das Lupen-Symbol

4. Links unter "Kategorie" nach unten scrollen und Klick auf "usercmd.ini"
5. Klick auf Button "Neu..."
6. Neuer Name für Befehl eingeben, zB em_Datei_an_Email, dann OK drücken
7. Kommando, Parameter, Icondatei, Tooltip erfassen (drücke F1-Taste für Hilfe)
______
______Kommando: outlook
______Parameter: /a %P%N
(Siehe support.office.com article/Command-line-switches-for-Outlook)
______Icondatei: C:\WINDOWS\System32\shell32.dll => das Brief-Symbol auswählen
______Tooltip: Strg + E | Datei unter Cursor mit Outlook versenden
______

8. OK, OK, OK drücken



- Tastaturkürzel anlegen:

1. Menü "Konfigurieren" - Einstellungen - Diverses auswählen
2. Tastenkombinationen umdefinieren: zum Beispiel
______anhaken von "Strg +",
______dann rechts außen das Dropdown-Feld anklicken und den Buchstaben "E" auswählen
3. In der Zeile von "Befehl" auf die Lupe klicken
4. In der Kategorie wieder usercmd.ini auswählen
5. Den Befehl "em_Datei_an_Email" anklicken, dann OK-Button drücken
6. ACHTUNG - Wichtig: Jetzt den grünen Pfeil rechts von der Lupe anklicken
7. OK anklicken
FERTIG

Ab jetzt sollte mit dem zeigen auf eine Datei im TC (Markierung nicht erforderlich)
und drücken von Strg + E eine neue Outlook-Nachricht erscheinen,
bei dem automatisch die Datei als Anhang vorhanden ist.

Gruß
Karl




ENGLISH

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

As alternative to the TC internal “cm_something” commands, (see TCs' internal commands post,
or TOTALCMD.INC -File in TC-Folder: cm_RightBySize, cm_RenameOnly, cm_CompareDirs,...)
you can create your own user commands “em_something
(E.g.: em_hide_selected, em_mydocuments, em_calc, em_newdir)


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
History wrote:23.07.06 Added: Support for user-defined commands em_xyz (Extended commands):
usercmd.ini in same directory as wincmd.ini,
with entries like this:
[em_notepad]
cmd=notepad.exe
param=%P%N
path=c:\windows
iconic=0 ([x] run minimized) (same as in .bar file, but not numbered)

23.07.06 Added: Read em_xyz commands from wcmd_lng.ini
(where wcmd_lng is the base name of the selected mnu file)
if not found in usercmd.ini, allows custom mnu files with user-defined commands

(“cm_” = command, “em_” = extended command)

You can use this "EM_" commands just like internal "CM_" commands
- as button
- in main menu
- in TCs' command line
- in Preferences > Configuration... > Misc. > Define Hotkeys
- with external tools via SendMessage/PostMessage


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



To create own user commands; use one of this two ways.



Way 1, manually by hand:

just edit the file usercmd.ini in your TC directory.


Note 1: Usercmd.ini is always in the same directory as wincmd.ini (see Help menu > About TC > Paths)
Note 2: If you have no usercmd.ini there, create the file first as plain text file (ASCII or UNICODE)
(if you utilize the 'Way 2' below, that file will be created for by TC itself)


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

Code: Select all

[em_MyCommandName]

cmd=     <full or relative path to your executable>
          (You can use the environment variables %commander_drive% or %commander_path% 
         to open programs independent from the drive letter of the USB stick.)

param=   <parameters to your command, if any or a TC-internal parameter like %P %N %T %L %F %S .....>

path=    <empty, dot, or wanted folder as working directory>

menu=    <like "tooltip=", add a tooltip if you want to use this em_command as command for an button>

button=  <like "icon=", chose the icon if you want to use this em_command as command for an button>

iconic=  < "=1" run minimized, else "=0" run normal mode and visible>
-----------------------------

(only the header and the cmd entry are need for a functional command. param is mostly used too to make any sense.
The others only if this user command should be used as menu button too, for to provide additional button settings)

Tip: right click an existent button, and then press F1 key and read more.


Examples:
totalcmd\usercmd.ini wrote:[em_hide_selected]
cmd=cd
param=*.*|%S
menu=Hide Selected Files
button=wcmicons.dll,73

[em_mydocuments]
cmd=cd %$PERSONAL%
menu=My Documents (personal)

[em_calc]
cmd=calc.exe


[em_newdir]
cmd=%COMSPEC% /c
param=if not exist "%T%O" md "%T%O"
menu=Make directory with same name as file under cursor in opposite panel
button=%COMMANDER_PATH%\wcmicons.dll,29

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
petermad wrote:
petermad, Power Member
Posted: Sat Mar 22, 2014 1:29 Post subject: Meaning and use of "iconic" in Default.bar
Source URL: http://ghisler.ch/board/viewtopic.php?t=39951

iconic=1 is what you get when you check the option "Run minimized" in the "Change button bar" dialog.
iconic=-1 is what you get when you check the option "Run maximized".

If the button you are editing points to another button bar (a subbar) then iconic=1 means "Show as menu".

If iconic= is not present or just says iconic= then it means iconic=0.



Whether iconic=0 is present or not depends on how you started editing the button:

1. If you use the menu: "Configuration" -> "Button bar" and then find and edit the button in the "Change button bar" dialog then iconic=0 is set.
Same thing if you right click on the blank space in the end of the button bar and choose "Change".

2. If you on the other hand right click on an button in the bar and choose "Change" then the dialog "Change single button" opens,
and if you press OK in this dialog with "Run minimized" unchecked, then no iconic=0 is set and an existing iconic=0 for that button is removed.


Also if you copy and paste a button to the bar, then the items in the .bar file are mixed up and not written in sequence.
If you open the "Change button bar" dialog and press OK, then the items in the .bar file will be sorted correctly again and missing iconic=0 are added.

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


Way 2, via dialog:

* open "Configuration > Options > Misc."
* choose any key (just temporarily for creating the command, or chose one to keep)
* click on magnifying glass icon, the 'cm_commandbrowser' will be launched
-or-
* just type 'cm_commandbrowser' into the TC command line box




-next-

* choose usercmd.ini at bottom of left listview
(the usercmd.ini file will be created if not existent yet, if you add a new command using new)

* click at [New]

* enter the wanted name for your new user defined command,
--- like for example 'em_MyCommandName'
--- (the "em_" -part is mandatory)
* click on OK

* type in your own command details,
or select a command on right side via the 'magnifying glass' symbol

* click on OK twice


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


See "TC internal 'cm_something' commands"- thread above for an how to use this commands.


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


Add shortcut key to em_ or cm_ commands


Utilize "Configuration > Options > Misc." to assign the hot key.

* open "Configuration > Options > Misc."
* by "shortcuts" choose a free key combo
* click on the magnifying glass
* type em_ (or cm_) and choose the wanted command by double clicking on it
* close the options dialog with [OK]
* click on OK



You can also manipulate the wincmd.ini's "[Shortcuts]" directly,

Examples:

[Shortcuts]
;Enable 'F2'-key to start inline-rename mode, additional to origin 'Shift+F6'
F2=cm_RenameOnly
;Enable 'Ctrl+F' to start find-files, additional to origin 'Alt+F7'
C+F=cm_SearchFor
;Use 'Ctrl+O' to launch DOS-Box in current path
C+o=cm_ExecuteDOS
;Disable 'Alt+F4' (Exit, close program), load Help instead
A+F4=cm_Keyboard
;Ctrl+Shift+Alt+F5 erstelle Archive im selben Panel
CA+F5=cm_PackFiles
;Ctrl+Shift+Alt+F5 erstelle Archive im selben Panel und lösche Source
CAS+F5=cm_PackFiles
C+P=cm_CopyNamesToClip
CS+P=cm_CopyFullNamesToClip
AS+F4=em_ShellNewFileTemplates


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


Example commands:

todo



See TC internal “cm_something” commands thread above for an how to use this commands.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
petermad wrote:AFAIK it is not possible to redirect usercmd.ini (to another place than the folder of the wincmd.ini)

But if you use a language file (not TC's internal English),
then you can also store user commands in a file with a name that corresponds the name of the language file.

If for example your language file is wcmd_arb.lng then you can store user commands in a file named wcmd_arb.ini

If your language file is wcmd_mytranslation_eng.lng then you can store user commands in a file named wcmd_mytranslation_eng etc.
Hint: Extended English Menus for Total Commander (by petermad), download at: http://www.totalcmd.net/authors/1223914.html


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

Change / Convert a TC button into a user defined command

------------------------------------------------ TC Button command (just an example):
Command: "%COMMANDER_PATH%\my Tools\MyNiftyTool.CMD"
Parameters: "%P"
Start path: "T:\his makes no sense here\but just as example"
Icon file: C:\Windows\System32\imageres.dll
Icon: 14
Tooltip: Text to display as tooltip
[X] Run minimized
[_] Run maximized
------------------------------------------------ TC Button, copied to clipboard, ready to paste back to TCs' button bar:
TOTALCMD#BAR#DATA
"%COMMANDER_PATH%\my Tools\MyNiftyTool.CMD"
"%P"
C:\Windows\System32\imageres.dll,14
Text to display as tooltip
"T:\his makes no sense here\but just as example"
1
-1
------------------------------------------------ TC user defined command (usercmd.ini)
[cm_MyNewCommand]
cmd="%COMMANDER_PATH%\my Tools\MyNiftyTool.CMD"
param="%P"
path="T:\his makes no sense here\but just as example"
button=C:\Windows\System32\imageres.dll,14 (used, if you want to use em_MyNewCommand as button command too)
menu=Text to display as tooltip (used, if you want to use em_MyNewCommand as button command too)
iconic=1
------------------------------------------------


Note:
- The clipboard example is just that, an example. You don't need that step if you want to convert from button to usercmd.
- The 'em_' part of the usercmd-name is mandatory!
- You can assign keyboard shortcuts to such user defined commands.
-

Pitfalls:
- Some expanded TC parameter get automatically quoted, some not. Depends on if path contains space, and on parameter-combination sometimes.
- That parameter, which returns paths, have automatically an trailing backslash added.
-
-


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


Links:
http://www.ghisler.ch/wiki/index.php/User-defined_command
http://www.ghisler.ch/wikide/index.php/Benutzerdefinierte_Befehle



Finde mich:
Find me:

 
Last edited by Stefan2 on 2018-03-08, 10:24 UTC, edited 14 times in total.
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Inquiry Basic Questions / Standardfragen an Hilfesuchende

Post by *Stefan2 »

This is a answers-only, no-questions how-to thread. Don't post questions, post here how-tos' only.

Please see first post for more information and how you can reach me for clarifying or suggesting improvements.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Inquiry Basic Questions / Standardfragen an Hilfesuchende


Please answer this basic questions / bitte beantworte diese Standardfragen >>> http://ghisler.ch/board/viewtopic.php?p=297396#297396

Basic questions - Your relevant answers:
A: Skills/Account (unsolicitous):
B: WindowsTM/Bit/UAC:
C: TC version/Bit/plugins:
D: Location/Examples:
E: Steps/Why/Done:

Standardfragen - Deine hier relevanten Antworten:
A: IT Erfahrungen/ Benutzerkonto (freiwillig):
B: WindowsTM/Bit/UAC:
C: TC Version/Bit/Plugins:
D: Speicherorte/Beispiele:
E: Schritte/Wieso/Bisher:




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

#################################### ENGLISH

Some basic questions to seeking help people (may be related to your issue or not):

** A: How would you rate your IT skills? (How detailed have we to instruct you?) non-existing/low/intermediate/general high
** -- Do you work with a limited user account, as administrator or as elevated administrator? At home or company?
(Answer only if you want to)

** B: Which WindowsTM do you use? W2k/XP/Vista/Win7/Win8/Win10
** -- Which bit architecture? 32-bit/64-bit
** -- Do you have UAC enabled?

** C: Which Total Commander version do you use? 32/64-bit? Installed or portable?
** -- Are here any relevant Plugins in use?

** D: Where are the files in question located? locally/ remote share/ zip archive/ ftp/ cd-rom/...
** -- Can you provide some example path and file NAMES (if relevant: file content/folder structure) and size?
** -- For renaming questions: provide origin and wanted file name examples! (origin.ext >>> wanted.ext)

** E: What are the *exactly* steps to reproduce the issue? (*exactly* means e.g. also: executed from menu/button/shortcut)
** -- What are you trying to do? What is your goal? (Let us understand you. And, maybe there are better ways to perform we can tell you)
** -- What have you already tried to do?


Note: to make things more clear you can upload somewhere a screenshot and post the link here.
How-to: http://ghisler.ch/board/viewtopic.php?p=287482#287482
Albeit new users can not post URLs to prevent spam, you just can split the URL like "www imagehost.com\123\myimage.png"

Note: please discuss only one subject/topic/issue in one thread. Open new threads for other issues.
Use a title that describes the content of your post. That way it can be found and be of use by others too.

And, from the Forum rules:
1.) Read up before asking! There is a dedicated FAQ section on the Total Commander homepage!
1a.) Use the search function before posting. Chances are your question has already been answered.
3.) Keep the focus: Questions outside the scope of a certain forum will ... be deleted.
8.) No cross posting. Post your message to the appropriate forum and nowhere else.

- - -

Basic questions - Your relevant answers:
A: Skills/Account:
B: WindowsTM/Bit/UAC:
C: TC version/Bit/plugins:
D: Location/Examples:
E: Steps/Why/Done:


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



#################################### DEUTSCH

Ein paar Standardfragen an Hilfesuchende (Passend zu deiner Angelegenheit, oder nicht)

** A: Wie würdest du deine IT-Kentnisse einschätzen? (Wie detailiert sollen wir antworten) keine/wenig/mittel/eigentlich hoch
** -- Arbeitest du als Anwender / Administrator / elevated Administrator? Zuhause oder in einer Firma?
(Antworte nur wenn du wirklich willst)

** B: Welches WindowsTM benutzt du? W2k/XP/Vista/Win7/Win8/Win10
** -- Welche Bit Architektur? 32-bit/64-bit
** -- Ist UAC eingeschaltet?

** C: Welche Total Commander version benutzt du? 32/64-bit? Installiert or portable?
** -- Hast du irgendwelche hier relevanten Plugins in Gebrauch?


** D: Wo sind die hier relevanten Dateien gespeichert? Lokal/ remote Freigabe/ ZIP Archive/ FTP/ CD-ROM/...
** -- Kannst du ein paar Beispielpfade und Dateinamen nennen (wenn relevant: Dateiinhalt/Ordnerstruktur) mit Größenangabe?
** -- Bei Umbenennfragen: nenne ein paar Vorher/Nachher Beispiele (Original.ext >>> Gewünscht.ext)

** E: Nenne die *genauen* Schritte um die Angelegenheit nachzuvollziehen (*genau* meint auch z.B.: Ausgeführt von Menü/Schaltfläche/Tastaturkürzel)
** -- Was möchtest du erreichen? Was ist dein Ziel? (Hilf uns dich zu verstehen. Eventuell gibt es andere Wege, welche wir die zeigen können)
** -- Was hast du bisher bereits versucht?


Note: to make things more clear you can upload somewhere a screenshot and post the link here.
How-to: http://ghisler.ch/board/viewtopic.php?p=287482#287482
Albeit new users can not post URLs to prevent spam, you just can split the URL like "www imagehost.com\123\myimage.png"

Note: please discuss only one subject/topic/issue in one thread. Open new threads for other issues.
Use a title that describes the content of your post. That way it can be found and be of use by others too.

And, from the Forum rules:
1.) Read up before asking! There is a dedicated FAQ section on the Total Commander homepage!
1a.) Use the search function before posting. Chances are your question has already been answered.
3.) Keep the focus: Questions outside the scope of a certain forum will ... be deleted.
8.) No cross posting. Post your message to the appropriate forum and nowhere else.

- - -

Standardfragen - Deine hier relevanten Antworten:
A: IT Erfahrungen/ Benutzerkonto:
B: WindowsTM/Bit/UAC:
C: TC Version/Bit/Plugins:
D: Speicherorte/Beispiele:
E: Schritte/Wieso/Bisher:



- - -



Und mit dem Windows Explorer funktioniert es?
Welches Windows OS benutzt du? W2k/XP/Vista/Win7/Win8/Win10(Build?)
Welche Bit Architektur? 32-bit/64-bit
Hast du Administratoren Rechte?

Welche Total Commander Version benutzt du? 32/64-bit?
Funktioniert es mit der anderen Bit-Version ( 32 statt 64, oder umgekehrt)?
Hast du irgendwelche hier relevanten Plugins in Gebrauch?
Funktioniert es, wenn du den TC als Administrator startest?
Arbeitest du als Administrator? ( ein ^- Zeichen vor dem Namen in der Titelleiste )

SIehe die Hilfe > "Konfiguration und Paramter > Kommandozeilenparameter"
Versuch mal den mit einer frischen INI (STandard Konfiguration) zu starten:
totalcmd.exe /N /I="%temp%\TC.ini"



Does it work with Windows Explorer?
Which Windows OS do you use? W2k/XP/Vista/Win7/Win8/Win10(Build?)
Which bit architecture? 32-bit/64-bit

Which Total Commander version do you use? 32/64-bit?
Do it work with opposite bitness (32 instead of 64, or vice versa)?
You can run 32bit and 64bit TC on a 64bit Windows, but only 32bit TC on a 32bit Windows.

Do it work running TC as Administrator?
Are here any relevant Plugins in use?

See the Help > "Configuration and Switches > Command line parameters"
Try to start TC with a fresh INI (default configuration):
totalcmd.exe /N /I="%temp%\TC.ini"



- - -

For renaming wishes:



-- Please provide a list of your existing, real world file names
(maybe ten to twenty), in every (or at least the most) possible occurrence/appearance.
We can only provide a solution for the examples you had posted here, every difference may let our advice fail for you.

Try cmd.exe "command line interpreter" in main folder with: DIR /B /S>"__List.txt" to create such list,
next copy and paste some relevant lines from that "__List.txt" here into the forum.
You may want to mask the words by concealing them, but keep each other detail, like digits,
parentheses, brackets, spaces, dots, hyphen, underscores, commas, case, original lengths...


-- Next provide a list how that files should be named after the renaming.


Please provide both lists in textual form (for us to create our own test files for to test our solution on)

You can just paste the lists in here into the forum:

Original existing names:
A - B.ext
C - D.ext
Wanted future names:
B - A.ext
D - C.ext


Thanks.


- - -




- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please see first post for more information and how you can reach me for clarifying or suggesting improvements.

Finde mich:
Find me:
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Platzhalter 3

Post by *Stefan2 »

,


Arbeitskopie/Sammlung für ein zukünftiges faq



Multi Umbenenn Tool (MUT) / MultiRename Tool (MRT)

MRT MUT
[E], RegEx and Subst



#############

Verwende MUT um Dateien zu verschieben

Kein : erlaubt, aber \ zum Ordner erstellen


VON:
22-1.png
29-1.png
ZU:
22\22-1.png
29\29-1.png

(\d\d)(-\d+)
$1\\$0

[x]RegEx
##########

habe einen ganzen Sack von Ordnern, die ich gerne so verschieben möchte, dass sie sich zukünftig in einem bestimmten Pfad befinden,
wobei Ordner mit gleichen Anfangsbuchstaben in gleichnamige Unterordner verschoben werden sollen.

[N1]\[N] allein geht - die Dateien landen dann in Unterverzeichnissen ihres aktuellen Verzeichnisses.
Absolute Pfade werden leider nicht unterstützt, weil die Funktion nicht zwischen Laufwerken verschieben kann.
Die angegebenen Namen gelten IMMER relativ zum aktuellen Ort der Datei, selbst wenn sie mit \ beginnen.
Es gibt aber eine Lösung: Stellen Sie einfach genügend \..\ vor den Namen, damit es auf jeden Fall bis ins Rootverzeichnis reicht, also z.B. so:
..\..\..\..\..\..\..\Users\All Users\Application Data\[N1]\[N]

Jedes "..\" bedeutet "einen Ordner die Hirachie nach oben"
Man kann auch mehr als nötig angeben, die ü´berzähligen werden dann ignoriert.


How to add Drive letter 'C:' to Multi Rename mask?
You can't use drive letters in MRT and the reason is simple: the colon is a reserved/forbidden character that cannot be in file names. AFAIK the backslash is the only special character that is allowed in MRT (maybe forward slash as well, but I don't know that) to be able to move files to different directories. Apparently it's not possible to move files to different drives. You could work around that by subst-ing a drive to some directory on the drive the files are currently on (and telling MRT to move the files to that substed directory)

#############


- - -

BranchView mit UNterordnern

- - -
MRT: How to access GREAT GRAND Grand parent folder name (hierarchy top level deep grant grandfather)
I know there's a parent [p] and grandparent [g] but [gg] did not work.
What is the code to use for a great grandparent directory in the rename tool?
viewtopic.php?p=354247#p354247

- - -
Multi Rename Tool (MRT): how to reset Control elements
Many times I have used the MRT to perform a quick rename function
only to find that command elements that I have used in the past remained
in the dialog box and actually took effect in the result, unwantedly.
viewtopic.php?f=14&t=52305&p=354068&hilit=mrt#p354050
- - -
Multi-rename tool: how to remove first N or last N chars
viewtopic.php?f=3&t=42775&p=354025&hilit=mrt#p300331
- - -
SystemTime (current date time Today Now)
For MRT, to add the current date&time, we can use: [N] [T3] [YMD] - [hms]
- - -
MRT: find a number and add before and after it new text
viewtopic.php?f=3&t=51283&p=348780
- - -
delete random string from filename
viewtopic.php?f=3&t=51081&p=347752

- - -

Filename mask____Extension____ Search&ReplaceCounter
[A]Search for:(.+\d\d\d\d).+ Start at:_1_
Replace with:$1 Step by _1_
☐⩟ ☐1x ☐[E] ☑RegEx ☐SubstDigits:_1_


Filename mask____Extension____ Search&ReplaceCounter
[N][E]Search for:xxx(\d+) Start at:_1_
Replace with:<Clear> Step by _1_
☐⩟ ☐1x ☐[E] ☑RegEx     ☐SubstDigits:_1_



☐ ▦ ☒ ☑ ◉ ⭘⩟ Ⓢ




Filename mask: [N]
Extension: [E]
Search for: xxx
Replace with: <Clear>
1x [E] RegEx Subst
Counter:
Start at: 1
Step by 1
Digits: 1

[N] Name [YMD] Date
[N#-#] Range [hms] Time
[C] Counter [=?] Plugin


[E] Extension
[E#-#] Range
[C] Counter

[Upper/lowercase]

[?] Help with more Information Tips&Tricks
▤ (F10) Opens a context menu with the following options: Load names from file / Edit names / Configure editor


F2 Load/save settings


[Start!]
[Undo]
[Results list]
[Close]
- - -
Beachte hierbei im MUT auch den [] Reload-Button, links neben dem [Start!].Knopf für den nächster Schritt:
Lädt die Umbenennresultate für den nächsten Schritt.
Nützlich falls Sie mehrere Umbenennregeln auf dieselben Dateien anwenden möchten. Taste: F5.
- - -

☐ ▦ ☒ ☑ ◉ ⭘⩟ Ⓢ

- - -

I am not sure if I understood what you're saying and what you're after (maybe to early in the morning for me)


but try instead of
Filename maskExtension
[N][E]

use
Filename maskExtension
[A]




Screenshot of Multi-Rename Tool: https://www.ghisler.com/screenshots/en/06.html




Explanation:
[N] old file name, WITHOUT extension
[E] Extension
[A] Old file name, WITH extension (All characters of the name), without the path
(Press F1-key in MutliRenameTool to read more)

If that doesn't help, post a few real name examples, before and after renaming.


Erklärung:
[N] Alter Dateiname, OHNE Erweiterung (Dateityp)!
[E] Erweiterung
[A] Alter Dateiname, MIT Erweiterung (Alle Zeichen des Namens)
Im MultiUmbenennTool drücke die F1-Taste für mehr Erklärungen.




[N] Alter Dateiname, OHNE Erweiterung (Dateityp)!
[N1] Das erste Zeichen des alten Dateinamens einfügen
[N2-5] Zeichen 2 bis 5 des alten Namens (Total 4 Buchstaben).
Hinweis: Zwei Byte Zeichen (z. B. Chinesisch, Japanisch) werden als ein Zeichen gezählt!
[N2,5] 5 Zeichen beginnend bei Zeichen Nummer 2
[N2-] Alle Zeichen beginnend ab dem zweiten.
[N-8,5] 5 Zeichen beginnend beim 8.-letzten Zeichen (gezählt vom Ende des Namens)
[N-8-5] Zeichen vom 8.-letzten zum 5.-letzten Zeichen
[N2--5] Alle Zeichen vom zweiten bis zum 5.-letzten Zeichen
[N-5-] Alle Zeichen vom 5.-letzten Zeichen bis zum Ende des Namens
[A] Alter Dateiname, MIT Erweiterung (Alle Zeichen des Namens)
[P] Name des Vaterverzeichnisses einfügen (Parent dir), also c:\verzeichnis\datei.txt -> fügt "verzeichnis" ein.
Ebenso gehen [P2-5], [P2,5], [P-8,5], [P-8-5] und [P2-], siehe Beschreibung von [N]
[G] Großvaterverzeichnis (Benutzung siehe [P]).
[E] Erweiterung



- - -

- - -
Alonzo Mosley wrote: 2019-07-10, 22:29 UTC explain the process

I use Regular expressions to match wanted signs,
group the match in (...) capture groups (counted and named from left $1,$2,..)
and re-order that matches in the replacement.


FROM:
GENERIC NAME (MM-DD-YYYY)
TO:
YY-MM-DD GENERIC NAME

DO:
-Search: (.+)\s\((\d\d)-(\d\d)-\d\d(\d\d)\)
-Replace: $4-$2-$3 $1
☑RegEx

DETAILS:
Pattern(.+)\s\((\d\d)-(\d\d)-\d\d(\d\d)\)
MatchEvery thing tilla spaceliteral open brackettwo digitshyphentwo digitshyphentwo digitstwo digitsclose bracket
FindGENERIC NAME (MM-DD-yyYY)
Store as$1$2$3$4


Replace by $4-$2-$3 $1
YY-MM-DD GENERIC NAME



More info at:
- Ctrl+M
- F1
- Scroll to line with "RegEx Now supports"
- and click at "regular expressions"


Or just ask.

HTH? :D
- - -

- - -



MUT Dateien nach dem ersten Buchstaben in Unterordner einsortieren:
- Wähle alle Dateien aus
- Starte das MehrfachUmbenenn-Tool (MUT, Strg+M)
- Verwende als Dateimaske: [N1]\[N]

Siehe die Hilfe im MUT für weitere Informationen.


Man kann auch zB Dateien nach dem Dateidatum in Unterordner einsortieren:
- Verwende als Dateimaske: [Y]\[N]
oder zB auch
- Verwende als Dateimaske: [Y]\[M]\[N]


Oder Dateien nach der Dateierweiterung in Unterordner einsortieren:
- Verwende als Dateimaske: [E]\[N]



- - -

- - -

MRT: how to use [L] [ U]

(I have added a space before the U because that MRT-syntax "[ U ]" is the same signs as used here in the forum for underlining :D )


Hi Bob,

have you tried to press the F1-key while in that rename dialog?


Still questions?




FROM:
TOTALCMD.EXE
TO:
TOTALCmd.exe
Use:
[N1-6][L][N7-8]



FROM:
tcmatch.dll
tcmatch.exe
tcmatch.ini
TO:
TCMATCH.DLL
TCMATCH.EXE
TCMATCH.INI
use:
[ U][N]





Help wrote:
[N2-5] Characters 2 to 5 from the old name
[L] All characters after this position in lowercase
[ U] All characters after this position in uppercase
(press the F1-key in rename dialog to read more)





Makes more sense with a few files with same name schema:

FROM:
2 UNLIMITED - Let the beat control your body.mp3
2 UNLIMITED - Megamix.mp3
2 UNLIMITED - No limit.mp3
2 UNLIMITED - The Real Thing.mp3
2 UNLIMITED - Twitlight Zone.mp3

TO:
2 Unlimited - Let the beat control your body.mp3
2 Unlimited - Megamix.mp3
2 Unlimited - No limit.mp3
2 Unlimited - The Real Thing.mp3
2 Unlimited - Twitlight Zone.mp3

Use:
[N1-3][L][N4-11][n][N12-255]

Read: give me first three, then lower case all until sign 11, after that we want to keep the origin case again.


- - -

- - -
Stefan2 wrote: 2019-12-29, 17:20 UTC Hi and welcome, FreeStyler!



FROM:
\TopFld\
|--- 20191221_134153.jpg
|--- 20191222_181130.jpg
|--- 20191222_191155_HDR.jpg
....

TO:
\TopFld\20191221\
|--- 20191221_134153.jpg
\TopFld\20191222\
|--- 20191222_134154.jpg
|--- 20191222_134155_HDR.jpg
....



USE:
Select All: Ctr+A
Launch MRT (multi-rename tool): Ctrl+M

In MRT press F1-key to read more about how to split file name into parts by using the [N] token.
Next you can use an "\"-backslash between the name parts to create folders on the fly and move the files into that folders: [N1-8]\[N]

Also you can use Search&Replace with [x]RegEx: Search:(\d{8}).+ ;;; Replace:$1\\$0





More questions, just ask.


- - -



FROM:
\TopFld\
|--- 20191221_134153.jpg
|--- 20191222_181130.jpg
|--- 20191222_191155_HDR.jpg
....

TO:
\TopFld\20191221\
|--- 134153.jpg
\TopFld\20191222\
|--- 134154.jpg
|--- 134155_HDR.jpg
....

USE:
[N1-8]\[N10-]
or RegEx: Search: (\d{8}).(.+) ;;; Replace: $1\\$2




HTH? :D

- - -



- - -
Script WDX content plugins Inhalts Plugins

Scripte zum einfügen des aktuellem Systemdatum


TC content plugin SCRIPT.WDX (32-Bit only)
http://www.totalcmd.net/plugring/script_wdx.html

Now.vbs
http://ghisler.ch/board/viewtopic.php?p=206065#206065

- - -

WinScript Advanced (32-Bit und 64-Bit)
http://ghisler.ch/board/viewtopic.php?t=44032

"CurrentDate.vbs"
http://ghisler.ch/board/viewtopic.php?t=44057


- - -

Content WDX Plugin: Boolean for Today and Yesterday Heute Gestern

WDX content plugin "filesys" (filesys sample plugin v2.5 from 31.Jan.2019)
Adds new fields "Today" and "Yesterday" give back a Boolean "Yes" or "No"
for current DATE (NOT the date in numbers as an string itself)

This works fine for Search for files created "Today" and "Yesterday",
and so for "Color by filetype" files created "Today" and "Yesterday" too.


Note: This doesn't work for MRT (Multi-rename tool):

[N1-8] [=filesys.Heute] [=filesys.Gestern]
12345678 Ja Nein.ext
But for MRT, to add the current date&time, we can still use [T3]:
[N1-8] [T3] [YMD] - [hms]
12345678 20190131 - 1314.ext (Jan 31, 2019 13:14)

In MRT press F1:
[T1] After this position, use last modification date/time from renamed file for all date/time fields (default).
Note: These are just switches! Use them with the other time placeholders, e.g. [T1][YMD] [hms]
[T2] After this position, use current date/time (when rename dialog was opened)
[T3] After this position, use current date/time (when rename options were last changed)


- - -
Search & Replace
The string entered in the field 'Search for' ... . . . . .
. . . .
.. .. . .
You can search+replace multiple strings in one step! The strings need to be separated by the vertical line (Alt+124).
Example: Replace Umlauts+Accents:
Search for: ä|ö|ü|é|è|ê|à
Replace with: ae|oe|ue|e|e|e|a
Works only for plain text, so don't enable RegEx!



- - -

- - -

- - -

- - -

- - -

- - -

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

Übersicht Deutscher FAQs Faden

Post by *Stefan2 »

Übersicht Deutscher FAQs Faden


Wurde verschoben nach

FAQs: Übersicht - Tipps & Tricks Sammlung
viewtopic.php?f=2&t=52423








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

Collection of English FAQs threads

Post by *Stefan2 »

- - - ENGLISH

Collection of English FAQs threads

Now moved to:
viewtopic.php?f=3&t=52425
FAQs: Summary - Tipps & Tricks collection




 




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

WIP FAQs: Search / Find Files, Folders and Content

Post by *Stefan2 »

FAQs: Search / Find Files, Folders and Content


Q: To ignore searching into NTFS links for folders and files (do not follow linked folders and ignore linked files content)


A: Try IgnoreLinks=8

IgnoreLinks=0 Allows to ignore hard links (junctions, reparse points) to directories in various functions.
Note: The function "Synchronize dirs" uses a separate option "SyncIgnoreJunctions".
Sum of:
1: copy/move/calculate occupied space
2: internal packers (zip, tar)
4: branch view
8: find files (except when using Everything), re-scan tree
16: ignore links even when they are selected in the current directory. Otherwise only links in selected subdirectories are ignored.




.




.



.



.



.

#
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Platzhalter 4

Post by *Stefan2 »

Arbeitkopie Work in progress

Zusammenfassung von

FAQs: Dateisuche, Dateien suchen und anwenden (= Suchergebnisse verarbeiten)
viewtopic.php?p=335791#p335791

FAQs: Dateisuche und Multi-Umbenenn Tool (MUT), Einstellungen Speichern Laden
viewtopic.php?p=335712#p335712

FAQs: Dateiliste filtern durchsuchen ausblenden anzeigen
viewtopic.php?p=336315#p336315

FAQs: Dateiliste - Filtern / Schnellsuche / Quick search filter / Ctrl+S ***
viewtopic.php?p=332810#p332810

FAQs: Dateien auswählen markieren selektieren, SELECTFILES
viewtopic.php?p=336323#p336323


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

ghisler(Author) wrote: 2006-01-31, 09:11 UTC Tue Jan 31, 2006
Tut mir leid für das Durcheinander, ich habe den Grund gefunden:
Diese Funktion wurde geändert, weil sich User beklagt haben, dass eine Suche nach
Hans Meier
auch Treffer mit nur "Hans" und nur "Meier" ergeben hat.

TC sucht schon seit ein paar Versionen wie folgt:

1. Falls nichts oder *.* angegeben wurde, alle Dateien finden
2. Falls der Suchstring einen * oder ein ? enthält -> Wildcardmethode.
___Nur bei dieser wird nach mehreren Teilstrings gesucht, etwa *.txt *.doc *.xls
3. Falls der Suchstring einen Punkt . enthält -> exakte Uebereinstimmung
4. Ansonsten Methode "enthalten in"

Beispiele:
======
Angabe: *.*
Resultat: finde alle Dateien (Typ 1)
Angabe: Hans
Resultat: finde Hans irgend wo im Namen (Typ 4)
Angabe: Hans Meier
Resultat: finde Hans Meier irgend wo im Namen (Typ 4)
Angabe: Hans.
Resultat: finde exakten Namen "Hans" (Typ 3)
Angabe: Hans.txt
Resultat: finde exakten Namen "Hans.txt" (Typ 3)
Angabe: Hans*
Resultat: Finde Namen, der mit "Hans" beginnt (Typ 2)
Angabe: "Hans Meier"
Resultat: z.Zt. nicht definiert! (Typ 4, stimmt nicht überein)
Angabe: "Hans Meier" "Fritz Müller"
Resultat: z.Zt. nicht definiert, da keine * oder ? enthalten
Angabe: "*Hans Meier*"
Resultat: Finde Hans Meier irgendwo im Namen (Typ 2)
Angabe: "*Hans Meier*" "*Fritz Müller"
Resultat: Finde Namen, der einen der beiden obigen Namen enthält, oder beide (Typ 2)
ghisler(Author) wrote: 2008-07-18, 07:16 UTC Fri Jul 18, 2008
Bei der Suche nach Namen, die sowohl Leerzeichen als auch einen Punkt enthalten,
muss der Name in doppelten Anführungszeichen geschrieben werden:
"The Bones - 04- half_of_nothing.mp3"

und nicht nur
The Bones - 04- half_of_nothing.mp3
sonst sucht Total Commander nach den einzelnen Namensteilen.
. . .
ghisler(Author) wrote: 2018-06-17, 07:08 UTC Sun Jun 17, 2018
spikey wrote: 2018-06-15, 19:34 UTC How do I use the Find Files dialogue to list all
files with a full stop (period) in the file name?

For example: joe.smith101.jpg

I am using "file name" to mean the part of the file's name
before the full stop separator and file extension.
aksmfakt132 wrote: 2018-06-16, 00:51 UTC You do not even need to use regular expressions
Search *.*.



The search string to use is actiually:
*.*.*.

Why?
TC always assumes a single dot at the end.
Then there are two (or more) dots required in the middle of the name.

If you just use '*.*.' it will match files with at least one dot in the name
(files which don't have an extension will be skipped).
nsp wrote: 2018-06-16, 05:31 UTC Most efficient version is to just contain operator like :

Code: Select all

Find Files
[Plugins] tab
tc | name | contains | .
- - -

gespeicherte Suche
ghisler(Author) wrote: 2018-09-12, 18:11 UTC Bitte das Feld "Suchen in" leer lassen! TC sucht dann im Verzeichnis des aktiven Dateifensters. Wenn man einen Punkt angibt, wird im zuletzt gesetzten aktuellen Verzeichnis gesucht - das kann u.U. je nach vorheriger Dateioperation auch ein anderes sein.
- - -



--
Locked