Page 1 of 4
Create multiple files at once
Posted: 2023-05-10, 14:47 UTC
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.:
in the dialog to create all three files at once?
TIA
Roman
Re: Create multiple files at once
Posted: 2023-05-10, 15:17 UTC
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?
Re: Create multiple files at once
Posted: 2023-05-10, 15:28 UTC
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)
Re: Create multiple files at once
Posted: 2023-05-10, 15:46 UTC
by beb
2
Stefan2, 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.
Re: Create multiple files at once
Posted: 2023-05-10, 20:12 UTC
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
Re: Create multiple files at once
Posted: 2023-05-10, 20:24 UTC
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.
Re: Create multiple files at once
Posted: 2023-05-12, 05:10 UTC
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] ...
Re: Create multiple files at once
Posted: 2023-05-12, 06:29 UTC
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.
Re: Create multiple files at once
Posted: 2023-05-12, 19:10 UTC
by solid
Support.
3 is not obvious that is in 2, but is a must.
Like in Create New Dir.
Re: Create multiple files at once
Posted: 2023-05-16, 18:02 UTC
by hi5
+1
Re: Create multiple files at once
Posted: 2023-05-24, 15:12 UTC
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
Re: Create multiple files at once
Posted: 2023-06-16, 17:55 UTC
by Hacker
A gentle bump.
Roman
Re: Create multiple files at once
Posted: 2023-06-22, 10:59 UTC
by Hacker
Another gentle bump.
Roman
Re: Create multiple files at once
Posted: 2023-06-25, 18:21 UTC
by Hacker
An extremely aggressive bump.
Roman
Re: Create multiple files at once
Posted: 2023-06-27, 10:59 UTC
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.