[TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Moderators: petermad, Stefan2, white, Hacker

User avatar
white
Power Member
Power Member
Posts: 6560
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *white »

When configuring the editor (cm_EditConfig), there are multiple methods of specifying the passed filename:
  1. Use "%1" - This parameter is inserted automatically when using the >> button and selecting a program
  2. Use %1 - TC uses 8.3 short filenames if possible (quotes are added by TC when necessary)
  3. Don't specify the filename - TC will add the filename at the end (quotes are added by TC when necessary)
Test performed in folders "c:\TEST\_cm_edit" and "d:\TEST\_cm_edit" (drive d: does not have short filenames enabled).
Quoting behavior that seems OK:
Button command: cm_Edit /CN="file 1.txt"

Command lines executed by TC:

(Editor: "C:\Program Files\Notepad++\notepad++.exe" "%1")
"C:\Program Files\Notepad++\notepad++.exe" "c:\TEST\_cm_edit\file 1.txt"
"C:\Program Files\Notepad++\notepad++.exe" "d:\TEST\_cm_edit\file 1.txt"

(Editor: "C:\Program Files\Notepad++\notepad++.exe" %1)
"C:\Program Files\Notepad++\notepad++.exe" C:\TEST\_cm_edit\FILE1~1.TXT
"C:\Program Files\Notepad++\notepad++.exe" "D:\TEST\_cm_edit\file 1.txt"

(Editor: "C:\Program Files\Notepad++\notepad++.exe")
"C:\Program Files\Notepad++\notepad++.exe" "c:\TEST\_cm_edit\file 1.txt"
"C:\Program Files\Notepad++\notepad++.exe" "d:\TEST\_cm_edit\file 1.txt"
When a list of filenames is used or when the C switch is left out, quoting behavior seems wrong (short names are not used, quotes are not added when necessary):
Button commands:
cm_Edit /CN="file 1.txt|file 2.txt"L1
cm_Edit /CN=<"file 1.txt" "file 2.txt">L1
cm_Edit /N="file 1.txt"

Command lines executed by TC:

(Editor: "C:\Program Files\Notepad++\notepad++.exe" "%1")
"C:\Program Files\Notepad++\notepad++.exe" "c:\TEST\_cm_edit\file 1.txt"
"C:\Program Files\Notepad++\notepad++.exe" "c:\TEST\_cm_edit\file 2.txt"
"C:\Program Files\Notepad++\notepad++.exe" "d:\TEST\_cm_edit\file 1.txt"
"C:\Program Files\Notepad++\notepad++.exe" "d:\TEST\_cm_edit\file 2.txt"

(Editor: "C:\Program Files\Notepad++\notepad++.exe" %1)
"C:\Program Files\Notepad++\notepad++.exe" c:\TEST\_cm_edit\file 1.txt
"C:\Program Files\Notepad++\notepad++.exe" c:\TEST\_cm_edit\file 2.txt
"C:\Program Files\Notepad++\notepad++.exe" d:\TEST\_cm_edit\file 1.txt
"C:\Program Files\Notepad++\notepad++.exe" d:\TEST\_cm_edit\file 2.txt

(Editor: "C:\Program Files\Notepad++\notepad++.exe")
"C:\Program Files\Notepad++\notepad++.exe" c:\TEST\_cm_edit\file 1.txt
"C:\Program Files\Notepad++\notepad++.exe" c:\TEST\_cm_edit\file 2.txt
"C:\Program Files\Notepad++\notepad++.exe" d:\TEST\_cm_edit\file 1.txt
"C:\Program Files\Notepad++\notepad++.exe" d:\TEST\_cm_edit\file 2.txt
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52373
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *ghisler(Author) »

You are right, it only works correctly when using parameter "%1" with double quotes. I will fix it.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6560
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *white »

HISTORY.TXT wrote: 05.04.26 Fixed: When using cm_Edit with certain parameters, the name passed to the editor wasn't enclosed in double quotes when not using parameter "%1" for the editor (32/64)
Tested TC 11.57rc4.

64-bit TC:
No behavior fixed.

32-bit TC:
No 8.3 short filename used when editor is configured using %1 (not enclosed by quotes).
Anything beyond mentioned test cases, is unchanged. Like using these commands:
cm_Edit /N="c:\test\_cm_edit\file.txt"
cm_Edit /N="file 1.txt|file 2.txt"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52373
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *ghisler(Author) »

64-bit: Sorry, it seems like I didn't port the fixes to 64-bit.

32-bit: Currently I'm just adding double quotes when there are spaces, I'm not using 8.3 names. Can you check whether this works with your examples, please? I will add 8.3 name support.
Anything beyond mentioned test cases, is unchanged. Like using these commands:
cm_Edit /N="c:\test\_cm_edit\file.txt"
This one works for me - there are no spaces and no long names, so where is the problem?
cm_Edit /N="file 1.txt|file 2.txt"
This one isn't supported. I will enable the C switch when there is more than one name.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6560
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *white »

ghisler(Author) wrote: 2026-04-09, 08:28 UTC 32-bit: Currently I'm just adding double quotes when there are spaces, I'm not using 8.3 names. Can you check whether this works with your examples, please?
Yes, that worked.
ghisler(Author) wrote: 2026-04-09, 08:28 UTC I will add 8.3 name support.
Please document the difference in behavior when using %1, "%1", or no parameter.
ghisler(Author) wrote: 2026-04-09, 08:28 UTC
Anything beyond mentioned test cases, is unchanged. Like using these commands:
cm_Edit /N="c:\test\_cm_edit\file.txt"
This one works for me - there are no spaces and no long names, so where is the problem?
You're right. My mistake, that works fine.
ghisler(Author) wrote: 2026-04-09, 08:28 UTC
cm_Edit /N="file 1.txt|file 2.txt"
This one isn't supported. I will enable the C switch when there is more than one name.
Please properly document the cm_Edit command.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52373
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *ghisler(Author) »

I found a way to support the opening of multiple files (counter or explicitly provided) also without the /C switch.

I will add the following to the help, at the end of the cm_Edit parameter:
Note: When opening a file with editor (/L1), the file name will be passed as 8.3 name when the parameter was set to %1 instead of "%1", or on Windows 95/98/ME when no parameter was provided.
I think the command is otherwise well documented. What do you miss?
cm_Edit
The following parameters can be passed to the function behind a slash:
C: Create files which do not already exist (automatically enabled when using the T switch)
T: Instead of creating an empty file, copy a template file to the new name. By default, the user's template directory will be used. The first file in it with the same extension will be copied to the new file. If no file is found, an empty file will be created
T="c:\path": Same as T but use the specified template directory
N="name": The name(s) of the file(s) to be opened/created - separate multiple file names with the | character. Alternatively, use templates from the "+" button to create multiple files. If a file already exists, it will just be opened, not overwritten with a new one.
Use angle brackets to pass multiple names in double quotes:
N=<"name1"|"name2"|"name3">
G: Go, create new files immediately (has no effect when not using C)
L: Launch type: L0=do not launch (only in combination with C), L1=open with default editor, L2=open with associated program (including internal associations), L3=open with associated program (no internal associations)
V="verb": Combined with L2 or L3, set the verb to open the file, e.g. "open" or "edit". Leave out or use V="" for default verb. With L1, WinExec will be used when not using V, otherwise ShellExecuteEx (which is always used for L2 and L3).
Note: When opening a file with editor (/L1), the file name will be passed as 8.3 name when the parameter was set to %1 instead of "%1", or on Windows 95/98/ME when no parameter was provided.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6560
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *white »

ghisler(Author) wrote: 2026-04-10, 08:06 UTC I will add the following to the help, at the end of the cm_Edit parameter:
Note: When opening a file with editor (/L1), the file name will be passed as 8.3 name when the parameter was set to %1 instead of "%1", or on Windows 95/98/ME when no parameter was provided.
In my opinion, the information about using %1, "%1" and no parameter belongs on the help page "Configuration - Edit/View", where it now only says:
Editor for F4 ENTER the name of an editor to use with F4. Default is notepad.exe.
Besides the information about the short names, the help text should also be clear that passed filenames are always enclosed in double quotes when using "%1" as a placeholder for the filename, but otherwise the filename is only enclosed in quotes when the filename contains a space.
The note at the end of help for the cm_Edit parameter could be short and refer this help page.

ghisler(Author) wrote: 2026-04-10, 08:06 UTC I think the command is otherwise well documented. What do you miss?
cm_Edit
The following parameters can be passed to the function behind a slash:
C: Create files which do not already exist (automatically enabled when using the T switch)
T: Instead of creating an empty file, copy a template file to the new name. By default, the user's template directory will be used. The first file in it with the same extension will be copied to the new file. If no file is found, an empty file will be created
T="c:\path": Same as T but use the specified template directory
N="name": The name(s) of the file(s) to be opened/created - separate multiple file names with the | character. Alternatively, use templates from the "+" button to create multiple files. If a file already exists, it will just be opened, not overwritten with a new one.
Use angle brackets to pass multiple names in double quotes:
N=<"name1"|"name2"|"name3">
G: Go, create new files immediately (has no effect when not using C)
L: Launch type: L0=do not launch (only in combination with C), L1=open with default editor, L2=open with associated program (including internal associations), L3=open with associated program (no internal associations)
V="verb": Combined with L2 or L3, set the verb to open the file, e.g. "open" or "edit". Leave out or use V="" for default verb. With L1, WinExec will be used when not using V, otherwise ShellExecuteEx (which is always used for L2 and L3).
Note: When opening a file with editor (/L1), the file name will be passed as 8.3 name when the parameter was set to %1 instead of "%1", or on Windows 95/98/ME when no parameter was provided.
What's missing is that when using C and one filename is specified, the editor is called by default. If more filenames are specified, this is not the case.

And you are still implementing opening of multiple files (counter or explicitly provided) without the /C switch. If you implement this so only existing are opened (in contrast to when a single file is specified), then information about this should be added as well.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52373
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *ghisler(Author) »

white wrote: In my opinion, the information about using %1, "%1" and no parameter belongs on the help page "Configuration - Edit/View"
OK, how about this:
ENTER the name of an editor to use with F4. Default is notepad.exe. The file to be edited can be passed to the editor in 3 ways:
"%1" parameter: long file name, always enclosed in double quotes
%1 parameter: short 8.3 name if available, otherwise long file name enclosed in double quotes when containing one or more spaces
No parameter: long file name on NT based systems like Windows 10/11, only enclosed in double quotes when containing one or more spaces. Short 8.3 name on Windows 95/98/ME

white wrote: What's missing is that when using C and one filename is specified, the editor is called by default. If more filenames are specified, this is not the case.
OK, I will include that. How about this:
L1 is automatically enabled when not using the C or T switches, or when only a single file (and no range) is provided

white wrote:And you are still implementing opening of multiple files (counter or explicitly provided) without the /C switch.
Yes.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6560
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *white »

ghisler(Author) wrote: 2026-04-12, 07:28 UTC
white wrote: In my opinion, the information about using %1, "%1" and no parameter belongs on the help page "Configuration - Edit/View"
OK, how about this:
ENTER the name of an editor to use with F4. Default is notepad.exe. The file to be edited can be passed to the editor in 3 ways:
"%1" parameter: long file name, always enclosed in double quotes
%1 parameter: short 8.3 name if available, otherwise long file name enclosed in double quotes when containing one or more spaces
No parameter: long file name on NT based systems like Windows 10/11, only enclosed in double quotes when containing one or more spaces. Short 8.3 name on Windows 95/98/ME
Yes, that looks clear.
ghisler(Author) wrote: 2026-04-12, 07:28 UTC
white wrote: What's missing is that when using C and one filename is specified, the editor is called by default. If more filenames are specified, this is not the case.
OK, I will include that. How about this:
L1 is automatically enabled when not using the C or T switches, or when only a single file (and no range) is provided
The command's name is cm_Edit, with description "Edit". It doesn't say create files and launching the editor is optional. And the N option is not (or no longer) a sub option for the C option. Because of that, I think it would be clearer if it was described the other way round (starting from the default behavior of launching the editor). And explaining it using plain words instead of code-oriented language seems better too. Perhaps use this for the explanation for the C and T switch:
C: Create files which do not already exist. When multiple files are specified (including via a range), the editor is not launched (L0 is automatically enabled)
T: Same a the C switch, but copy a template file to the new name. By default, the user's template directory will be used. The first file in it with the same extension will be copied to the new file. If no file is found, an empty file will be created
T="c:\path": Same as T but use the specified template directory
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52373
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *ghisler(Author) »

That's a good idea, with one small correction for the C switch:
C: Create files which do not already exist. When multiple files are specified (or a range), the editor is not launched (L0 is automatically enabled)
and one for the L switch:
(only in combination with C or T)
and the G switch:
(only in combination with C or T)
That's because the editor will not be launched even if the range only creates a single file, e.g.
cm_edit /N="<1-1>file [C].txt"

So the resulting text would be:
cm_Edit
The following parameters can be passed to the function behind a slash:
C: Create files which do not already exist. When multiple files are specified (or a range), the editor is not launched (L0 is automatically enabled)
T: Same a the C switch, but copy a template file to the new name. By default, the user's template directory will be used. The first file in it with the same extension will be copied to the new file. If no file is found, an empty file will be created
T="c:\path": Same as T but use the specified template directory
N="name": The name(s) of the file(s) to be opened/created - separate multiple file names with the | character. Alternatively, use templates from the "+" button to create multiple files. If a file already exists, it will just be opened, not overwritten with a new one.
Use angle brackets to pass multiple names in double quotes:
N=<"name1"|"name2"|"name3">
G: Go, create new files immediately (only in combination with C or T)
L: Launch type: L0=do not launch (only in combination with C or T), L1=open with default editor, L2=open with associated program (including internal associations), L3=open with associated program (no internal associations). L1 is automatically enabled when not using the C or T switches, or when only a single file (and no range) is provided
V="verb": Combined with L2 or L3, set the verb to open the file, e.g. "open" or "edit". Leave out or use V="" for default verb. With L1, WinExec will be used when not using V, otherwise ShellExecuteEx (which is always used for L2 and L3).
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6560
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *white »

ghisler(Author) wrote: 2026-04-13, 08:31 UTC So the resulting text would be:
cm_Edit
The following parameters can be passed to the function behind a slash:
C: Create files which do not already exist. When multiple files are specified (or a range), the editor is not launched (L0 is automatically enabled)
T: Same a the C switch, but copy a template file to the new name. By default, the user's template directory will be used. The first file in it with the same extension will be copied to the new file. If no file is found, an empty file will be created
T="c:\path": Same as T but use the specified template directory
N="name": The name(s) of the file(s) to be opened/created - separate multiple file names with the | character. Alternatively, use templates from the "+" button to create multiple files. If a file already exists, it will just be opened, not overwritten with a new one.
Use angle brackets to pass multiple names in double quotes:
N=<"name1"|"name2"|"name3">
G: Go, create new files immediately (only in combination with C or T)
L: Launch type: L0=do not launch (only in combination with C or T), L1=open with default editor, L2=open with associated program (including internal associations), L3=open with associated program (no internal associations). L1 is automatically enabled when not using the C or T switches, or when only a single file (and no range) is provided
V="verb": Combined with L2 or L3, set the verb to open the file, e.g. "open" or "edit". Leave out or use V="" for default verb. With L1, WinExec will be used when not using V, otherwise ShellExecuteEx (which is always used for L2 and L3).
N="name": The name(s) of the file(s) to be opened/created - separate multiple file names with the | character. Alternatively, use templates from the "+" button to create multiple files. If a file already exists, it will just be opened, not overwritten with a new one.
Leave out "/created" and "If a file already exists, it will just be opened, not overwritten with a new one."
Add:
When multiple files are specified, or a range, the editor is not launched for files that do not exist (use C or T to create them before opening).
Help in version 11.56:
Use the following syntax to pass multiple names in double quotes:
N=<"name1" "name2" "name3">
Help in version 11.57:
Use angle brackets to pass multiple names in double quotes:
N=<"name1"|"name2"|"name3">
Did you officially change the syntax to using "|" as separator in version 11.57 to align with the cm_MkDir command?
Both " " and "|" seem to work. Perhaps it is better to explicitly mention the allowed separators? (for cm_MkDir too)
L: Launch type: L0=do not launch (only in combination with C or T), L1=open with default editor, L2=open with associated program (including internal associations), L3=open with associated program (no internal associations). L1 is automatically enabled when not using the C or T switches, or when only a single file (and no range) is provided
Personally, I would prefer it if L0 also works without C or T. It may seem useless because nothing would happen, but it would be more consistent and simple (which makes it more predictable for the user) and it enables the user to temporarily disable the command while keeping the remainder of the command intact.

The line "L1 is automatically enabled when not using the C or T switches, or when only a single file (and no range) is provided" is what prompted my critique and let you to change the help for the C and T switch. Suggestion:
L1 is the default, except when using the C or T switch (see explanation of the C switch)"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52373
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *ghisler(Author) »

When multiple files are specified, or a range, the editor is not launched for files that do not exist (use C or T to create them before opening).
This is not the same information as what you tell me to remove. I think it's important to tell the user that he can create files with the N switch.
Did you officially change the syntax to using "|" as separator in version 11.57 to align with the cm_MkDir command?
Yes, I added support for "|" as separator, but kept spaces for backwards compatibility.
Personally, I would prefer it if L0 also works without C or T.
There is no error when you use L0 without C and T, but it just does nothing. The text "only in combination with C or T" just tells the user that it's meaningless to use L0 if no files will be created.
L1 is the default, except when using the C or T switch (see explanation of the C switch)"
OK, I can use that.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6560
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *white »

ghisler(Author) wrote: 2026-04-14, 08:58 UTC
When multiple files are specified, or a range, the editor is not launched for files that do not exist (use C or T to create them before opening).
This is not the same information as what you tell me to remove. I think it's important to tell the user that he can create files with the N switch.
The user cannot create files with the N switch. That's what the C switch does. The N switch only specifies filenames.
And you leave out important behavior when not using the C or T switch and specified files do not exist. If only one file is specified, the editor is launched with the filename anyway. If multiple files are specified, this is not the case.
ghisler(Author) wrote: 2026-04-14, 08:58 UTC
Did you officially change the syntax to using "|" as separator in version 11.57 to align with the cm_MkDir command?
Yes, I added support for "|" as separator, but kept spaces for backwards compatibility.
It seems important to mention that a space is also allowed as separator. Using a space as a separator may be more convenient for users in certain circumstances.
This also creates an inconsistency with the help for Shift+F4:
Help - SHIFT+F4: New text file wrote: Alternatively, the names can be passed in double quotes separated by spaces (or vertical lines):
"file1.txt" "file2.txt" "file3.txt"
If "|" is now your preferred separator, shouldn't this help text be changed as wel?
ghisler(Author) wrote: 2026-04-14, 08:58 UTC
Personally, I would prefer it if L0 also works without C or T.
There is no error when you use L0 without C and T, but it just does nothing. The text "only in combination with C or T" just tells the user that it's meaningless to use L0 if no files will be created.
I understand. You say without C and T, L0 does nothing. I said I would prefer it if L0 also worked when not using C or T. This would cause the entire command doing nothing. And I gave the reason why:
It may seem useless because nothing would happen, but it would be more consistent and simple (which makes it more predictable for the user) and it enables the user to temporarily disable the command while keeping the remainder of the command intact.
You have not addressed these arguments.
Fla$her
Power Member
Power Member
Posts: 3788
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *Fla$her »

I suggest writing as follows:
cm_Edit
N="name": The name(s) of the file(s) to be opened/created - separate multiple file names with the | character or a space. Alternatively, use templates from the "+" button to create multiple files. If a file already exists, it will just be opened, not overwritten with a new one.
For multiple names, two types of syntax are allowed.
1. All names are listed in common quotation marks:
N="name1|name2|name3"
2. All names in separate quotation marks are enclosed in angle brackets:

N=<"name1"|"name2"|"name3"> or N=<"name1" "name2" "name3">

cm_MkDir
N="name": The name(s) of the folder(s) to be created - separate multiple file names with the | character. The templates from the "+" button in the F7 dialog can also be used here.
For multiple names, two types of syntax are allowed.
1. All names are listed in common quotation marks:
N="name1|name2|name3"
2. All names in separate quotation marks are enclosed in angle brackets:

N=<"name1"|"name2"|"name3">
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 52373
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.57rc2] cm_Edit - Quoting behavior with different configurations for the editor

Post by *ghisler(Author) »

white wrote:The user cannot create files with the N switch.
But the file name they specify via /N switch can be used either for opening or creating files, or both. So not mentioning the creation is incorrect.
white wrote:And you leave out important behavior when not using the C or T switch
No, this is already mentioned in the description of the C switch: "When multiple files are specified (or a range), the editor is not launched (L0 is automatically enabled)".
white wrote:If "|" is now your preferred separator, shouldn't this help text be changed as wel?
You didn't quote the entire section. The part above it mentions vertical lines:
If the name contains the vertical line |, you can create multiple files at once without opening the editor. This only works with local files.
Example:
file1.txt|file2.txt|file3.txt
Alternatively, the names can be passed in double quotes separated by spaces (or vertical lines):
"file1.txt" "file2.txt" "file3.txt"
I don't think it's necessary to mention that it's allowed to use double quotes also with the | separator . But I will change the examples to have spaces in the names, and also include an example with quotes and vertical lines:
Example:
file 1.txt|file 2.txt|file 3.txt
Alternatively, the names can be passed in double quotes separated by spaces (or vertical lines):
"file 1.txt" "file 2.txt" "file 3.txt"
"file 1.txt"|"file 2.txt"|"file 3.txt"
white wrote:I understand. You say without C and T, L0 does nothing. I said I would prefer it if L0 also worked when not using C or T. This would cause the entire command doing nothing.
But that's already what happens! Maybe the wording "L0=do not launch (only in combination with C or T)" confuses you? It means that the L0 switch only makes sense when used with C or T, because otherwise nothing happens. How else would you explain that? If I leave out the C or T part, people would complain that L0 does nothing.

2Fla$her
That's looks more complex than what I use now.
I will use this instead:
N="name": The name(s) of the file(s) to be opened/created - separate multiple file names with the | character, or put them in double quotes and separate them by spaces. Alternatively, use templates from the "+" button to create multiple files. If a file already exists, it will just be opened, not overwritten with a new one.
Use angle brackets to pass multiple names in double quotes:
N=<"name1"|"name2"|"name3">
Author of Total Commander
https://www.ghisler.com
Post Reply