Create multiple files at once

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Create multiple files at once

Post by *Hacker »

Hi,
07.05.23 Added: cm_EditNewFile with parameter 1 now creates a new file without opening the editor.
Could we enter e.g.:

Code: Select all

file1.txt|file2.txt|file3.txt
in the dialog to create all three files at once?

TIA
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
beb
Senior Member
Senior Member
Posts: 434
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Create multiple files at once

Post by *beb »

Hacker wrote: 2023-05-10, 14:47 UTCcm_EditNewFile with parameter 1
It would be implemented since beta2?
What is the syntax?
Would it be possible to create a file with a custom name?
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Stefan2
Power Member
Power Member
Posts: 4155
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Create multiple files at once

Post by *Stefan2 »

beb wrote: 2023-05-10, 15:17 UTC
Hacker wrote: 2023-05-10, 14:47 UTCcm_EditNewFile with parameter 1
It would be implemented since beta2?
Yes, see https://www.ghisler.com/history1100.txt


ghisler(Author) wrote:
Thank you Christian for implementing it. This was asked for now and then.



beb wrote: 2023-05-10, 15:17 UTCWhat is the syntax?
"cm_EditNewFile" is the internal command to open an existing file in the configured editor (F4), and first create the file, if not already present.

Use "cm_EditNewFile 1" to create a new text file, but don't open it instantly in the configured editor.
Most useful for myself too, for to create new text files just as notice, now w/o the need to close the disturbing popping up editor.



beb wrote: 2023-05-10, 15:17 UTC Would it be possible to create a file with a custom name?
Yes, in the opened dialog box. Just write cm_EditNewFile into the TC command line and see (or press Shift+F4)




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

Re: Create multiple files at once

Post by *beb »

2Stefan2, thank you!
Stefan2 wrote: 2023-05-10, 15:28 UTC Use "cm_EditNewFile 1" to create a new text file, but don't open it instantly in the configured editor.
That's good, I get it.
Stefan2 wrote: 2023-05-10, 15:28 UTC Yes, in the opened dialog box...
That's not what I want.
I'd want namely:
- to create a new text file, [that's already by design]
- don't open it instantly in the configured editor, [that's already by design]
- create the above file with a predefined custom name (without any dialog boxes) [that's what I wish]

So, may I dare to put another suggestion here related to the "cm_EditNewFile 1", - to add an option for the custom file name e.g.:

Code: Select all

cm_EditNewFile 1 "custom_file_name.txt"
and combining it with your suggestion, create more than one file with custom name(s):

Code: Select all

cm_EditNewFile 1 "custom_file_name1.txt"|"custom_file_name2.ext"|"custom_file_nameN.etc"
Thank you.

PS. Meanwhile, beta2 becomes public, so it's time for the new tests.

edit

The test shows that I have misunderstood the command "cm_EditNewFile 1".

Now it always comes with a pop-up dialog box that offers to enter the file name.

Thus, my suggestion remains. I'm still asking for the option to use "cm_EditNewFile 1" with the predefined file name(s) [including based on the available naming templates, that are good] avoiding any dialogs.

Thanks again.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Create multiple files at once

Post by *Hacker »

OK, so we have two suggestions about creating multiple files:
1. by entering something like file1|file2|file3 into the dialog
2. by entering something like cm_EditNewFile 1 file1|file2|file3 onto the command line or some user command

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
beb
Senior Member
Senior Member
Posts: 434
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Create multiple files at once

Post by *beb »

Hacker wrote: 2023-05-10, 20:12 UTC OK, so we have two suggestions about creating multiple files
Yes, sir. Entirely agree.
Thank you.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: Create multiple files at once

Post by *KozakMak »

Hacker wrote: 2023-05-10, 20:12 UTC OK, so we have two suggestions about creating multiple files:
3. use of templates: <[YMD] <[hms] ...
OS: Win10 | TC: latest x64
User avatar
beb
Senior Member
Senior Member
Posts: 434
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Create multiple files at once

Post by *beb »

KozakMak wrote: 2023-05-12, 05:10 UTC 3. use of templates: <[YMD] <[hms] ...
3. is included in 2.
beb wrote: 2023-05-10, 15:46 UTC "cm_EditNewFile 1" with the predefined file name(s) [including based on the available naming templates, that are good]
Thanks for supporting.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: Create multiple files at once

Post by *solid »

Support.
3 is not obvious that is in 2, but is a must.
Like in Create New Dir.
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Create multiple files at once

Post by *hi5 »

+1
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Create multiple files at once

Post by *Hacker »

Christian,
OK, so we have two suggestions about creating multiple files:
1. by entering something like file1|file2|file3 into the dialog
2. by entering something like cm_EditNewFile 1 file1|file2|file3 onto the command line or some user command
Could you please add this?

TIA
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Create multiple files at once

Post by *Hacker »

A gentle bump.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Create multiple files at once

Post by *Hacker »

Another gentle bump.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Create multiple files at once

Post by *Hacker »

An extremely aggressive bump.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Create multiple files at once

Post by *ghisler(Author) »

Unfortunately this would not work well together with parameter 1. Numeric parameters can be passed as LPARAM directly to the internal function, text parameters can't. It would break scripts calling cm_EditNewFile with parameter 1.
Author of Total Commander
https://www.ghisler.com
Post Reply