cm_Edit: how to get to that magical [ + ] button described in the command help?

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *beb »

Help [Index] Dialog box: Choose command
or
& hh.exe $env:commander_path\TOTALCMD.CHM::dlg_choosecommand.htm
cm_Edit The following parameters can be passed...
...Alternatively, use templates from the "+" button to create multiple files...
Where's that?
What command should I use, or what GUI steps should I make to see that magic [ + ] button related to the cm_Edit command?
Sorry for the dumb question, but while I was experimenting with cm_Edit (which I usually did by typing something manually), I became interested if that plus would drop me some hints, but I couldn't find it anywhere.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3299
Joined: 2003-05-06, 11:46 UTC

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *Sir_SiLvA »

To find the mentioned [+] Button open the Multi-Rename-Tool :!:
Press on [+] and you find all the templates.

HTH
Hoecker sie sind raus!
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *beb »

2Sir_SiLvA
Thank you.
It was exactly the first idea that came into my mind a couple of days ago, so I went there and picked up the first thing there, and it just didn't work.
For example:
Let's say, I want to make an empty dummy file, that has to be named after the active directory I'm in.
In Multi-Rename-Tool syntax, under its [ + ] button, the directory would be [P].
Thus, I'm trying the following command syntax:

Code: Select all

[em_dummy_file_probe]
cmd=cm_Edit
param=/C /N="[P].txt" /L0 /G
Literal result: [P].txt
The other attempts similar to that render errors, or no action at best.
The actual workable command here (using special internal parameters/variables):

Code: Select all

[em_dummy_file_probe]
cmd=cm_Edit
param=/C /N="%B.txt" /L0 /G
where (%B):
%B, %B0..%B9
adds a directory name from the path (including the relative path from branch view, or the search result).
%B or %B0 = parent directory, %B1 = grandparent directory etc.
So what is the actual cm_Edit command syntax then, regarding the Multi-Rename-Tool approach (which puts everything in [brackets])?
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *Fla$her »

Logically, there should also be an angle bracket: cm_Edit /CGL0N="<[P].txt"
But it's been working for me on and off. I can't figure out the cause.
Overquoting is evil! 👎
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *beb »

2Fla$her
Yes, this works. Thanks.

Going further, and making a mistake in command, I have finally figured out where that [ + ] button is, and how it can be accessed.
A corresponding popup window will appear upon executing a command that does not imply immediate effect (goes without /G key), or has an uncritical error.

Commands like, cm_Edit /CGL0N="<[P].txt", cmd=cm_Edit /C /N="dummy.txt" /L0 /G have an immediate effect, and the popup window isn't invoked.

If to remove /G from there (where G: Go, create new files immediately (has no effect when not using C)) the popup window will be invoked.
So, commands like, cm_Edit /CL0N="<[P].txt", cmd=cm_Edit /C /N="dummy.txt" /L0 do this.
cm_Edit /C command will invoke the window, and even some erroneous commands like cm_Edit /CL0N="<[P]<[P].txt", cm_Edit /C /N="[][]][" will invoke it as well.

Image: https://i.imgur.com/5edLyBz.png
Image: https://i.imgur.com/h1YCa6S.png

Unbelievable.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *beb »

Fla$her wrote: 2024-02-06, 21:41 UTC Logically, there should also be an angle bracket: cm_Edit /CGL0N="<[P].txt"
But it's been working for me on and off. I can't figure out the cause.
2Fla$her
When you hit that [ + ] button there and try to choose something from the popup menu, the angle bracket will be inserted automatically when needed (as I can see it now). I didn't do detailed research on what else is hidden there.

Thank you again, you dropped a hint when needed, and the question is closed.

PS. I tried bare cm_Edit back then, and it's been useless. And I even didn't manage to make a suitable error like today.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *white »

beb wrote: 2024-02-06, 23:39 UTC Thank you again, you dropped a hint when needed, and the question is closed.
I think you raised a valid issue that the help text is not clear. Perhaps change:
Alternatively, use templates from the "+" button to create multiple files.
to:
Alternatively, use placeholders as mentioned on the [SHIFT+F4: New text file] help page.
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *beb »

white wrote: 2024-02-07, 12:26 UTC
... [SHIFT+F4: New text file] ...
2white
Meanwhile, I temporarily made cm_Edit \C to quickly access that function when needed. And now I can get rid of it.
[SHIFT+F4] is a direct answer to my original question. The shortcut is always on hand. Thank you.
Definitely, it is worth making the help a bit more informative in that regard, at least [SHIFT+F4: New text file] shortcut should be explicitly mentioned there.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3299
Joined: 2003-05-06, 11:46 UTC

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *Sir_SiLvA »

beb wrote: 2024-02-07, 12:52 UTC
white wrote: 2024-02-07, 12:26 UTC
... [SHIFT+F4: New text file] ...
2white
Meanwhile, I temporarily made cm_Edit \C to quickly access that function when needed. And now I can get rid of it.
[SHIFT+F4] is a direct answer to my original question. The shortcut is always on hand. Thank you.
Definitely, it is worth making the help a bit more informative in that regard, at least [SHIFT+F4: New text file] shortcut should be explicitly mentioned there.
Why? for shortcuts you have the keyboard help-page and text file that comes with your tc :?: :!:
Hoecker sie sind raus!
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *Fla$her »

Fla$her wrote: 2024-02-06, 21:41 UTC But it's been working for me on and off. I can't figure out the cause.
The reason was the lack of space for pagefile.sys. I don't know why TC has frequent problems with this, especially when calling dialogs.
Either it shows some errors, or just the commands don't work.

In the help, it would be good to explain the need to use '<'.
Overquoting is evil! 👎
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *beb »

Fla$her wrote: 2024-02-07, 23:08 UTC The reason was the lack of space for pagefile.sys. I don't know why... to use '<'.
It sounds weird as [you know what...]
I wonder how you even did manage to find out the [co]relation.
It's clear that you're far beyond than just an experienced user, but it's still a bit like a miracle...
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *Fla$her »

2beb
I agree that this sounds strange, but there is an interrelation, even if indirect, since TC starts working stably only after enough space on the system drive is freed up. I've noticed these problems for a long time, encountering bugs when calling the configuration dialogs, especially pages with a lot of options. Then I started noticing this when calling the filtering, selection, etc. dialogs. If errors appeared, they often indicated problems with RAM.
I free up space by disabling the hypernation (powercfg -h off), after which I immediately observe the stabilization of TC. I forgot to do it that time, so there were problems with the command.

JOUBE wrote: 2024-02-03, 05:51 UTC Maybe for you as a new user.
beb wrote: 2024-02-08, 00:04 UTC It's clear that you're far beyond than just an experienced user
What kind of contrast, don't you think? :mrgreen:
Overquoting is evil! 👎
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *sa16 »

2Fla$her
But it's been working for me on and off. I can't figure out the cause.
It looks like a bug. Without /G, the cm_Edit /CL0N="<[P].txt" command works normally.
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *Fla$her »

sa16 wrote: 2024-02-08, 07:32 UTC Without /G, the cm_Edit /CL0N="<[P].txt" command works normally.
For me, it's the opposite — it works with /G, but without /G an error occurs.
Overquoting is evil! 👎
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: cm_Edit: how to get to that magical [ + ] button described in the command help?

Post by *sa16 »

Also, the behavior of TC11.00 (in the example under consideration) differs from more recent versions, apparently because of this addition.
21.08.23 Release Total Commander 11.01 release candidate 1
09.08.23 Added: cm_Edit: Parameter /N now supports alternate syntax /N=<"file1.txt" "file2.txt" "file3.txt"> to pass multiple names to the function more easily (32/64)
Post Reply