How-to "Create New File" in TC? . (new text file)
Moderators: white, Hacker, petermad, Stefan2
How-to "Create New File" in TC? . (new text file)
Hi all.
I'm looking for a way to create a new file using a keyboard shortcut.
I couldn't find this feature on TC alone, so i looked for a plug, but no luck.
To be more precise -
I want to set (ie.) ctrl+shift+T to create an new .txt in the selected dir.
Or at least to open the 'new file' dialog...
I thought this was the place to ask...
I'm looking for a way to create a new file using a keyboard shortcut.
I couldn't find this feature on TC alone, so i looked for a plug, but no luck.
To be more precise -
I want to set (ie.) ctrl+shift+T to create an new .txt in the selected dir.
Or at least to open the 'new file' dialog...
I thought this was the place to ask...
http://en.totalcmd.pl/download/add/Add/New_File
http://en.totalcmd.pl/download/add/add/Newfile
http://www.qunomsoft.com/nf_index.htm
http://tcup.pl/index.php?l=en&s=download&akcja=pokaz (this is a big download that has another alternative inside)
Search this forum for more suggestions (like instantly creating one)
Edited.
http://en.totalcmd.pl/download/add/add/Newfile
http://www.qunomsoft.com/nf_index.htm
http://tcup.pl/index.php?l=en&s=download&akcja=pokaz (this is a big download that has another alternative inside)
Search this forum for more suggestions (like instantly creating one)
Edited.
ahhh....
Ok... I got somewhere.
Using Stefan2's advice, i made the "usercmd.ini" with the command
But!
But, Notepad asks me if i want to create the new file, as it does not exist...
I find this rather annoying, because - of course i want to create it, damn it!
So, i'm thinking... There's got to be a command for notepad to save the file automaticaly...
Ideas?
I can live with pressing 'enter' every time, it's just... It aint perfect that way...
-----------------------------
I also must say, that this specific topic should be in the FAQ or wiki or something, where it is very visible,
as i've this question quite a few times while boaring through the forum... It might save some time to all.
-----------------------------
I'm going to bed, the whole searching thing has me brainwashed.
I hope not to dream the SHIFT+F4 monster...
Good night ppl...
Using Stefan2's advice, i made the "usercmd.ini" with the command
Code: Select all
[em_NewFile]
Cmd=notepad
Param=?&P%O
But, Notepad asks me if i want to create the new file, as it does not exist...
I find this rather annoying, because - of course i want to create it, damn it!
So, i'm thinking... There's got to be a command for notepad to save the file automaticaly...
Ideas?
I can live with pressing 'enter' every time, it's just... It aint perfect that way...
-----------------------------
I also must say, that this specific topic should be in the FAQ or wiki or something, where it is very visible,
as i've this question quite a few times while boaring through the forum... It might save some time to all.
-----------------------------
I'm going to bed, the whole searching thing has me brainwashed.
I hope not to dream the SHIFT+F4 monster...
Good night ppl...
Yes, there is a solution.
It's quick and dirty, I wrote it some time ago for sb. asking the same question on the polish forum.
Usage:
Download putfile.exe to some directory. In this directory create a file named "editor". Yes, without extension. Write
inside. (In general - path to editor you want to use with putfile).
Change your command to
It's quick and dirty, I wrote it some time ago for sb. asking the same question on the polish forum.
Usage:
Download putfile.exe to some directory. In this directory create a file named "editor". Yes, without extension. Write
Code: Select all
notepad
Change your command to
Code: Select all
[em_NewFile]
Cmd=c:\path_to_putfile\putfile.exe
Param=?&P%O
So i did exactly that.
This is the comand in usercmd.ini
And in the same folder, a file named editor with this in it:
The command opens up the dialogue asking for name of the file. [the dialogue gives the name of the selected item + &P before it!]
I write 'asd'.
And it creates just a file named asd. No extension. No nothing.
I'd say there's a mistake in the command line. Or i did something all wrong.
-----------------------------
One more thing:
Is there a quick way to copy the location of current dir, without using the command line?
I always have to click the bar which shows this (just above the file list) twice, and then copy...
This is the comand in usercmd.ini
Code: Select all
[em_NewFile]
Cmd=D:\blabla...\plugins\Putfile\putfile.exe
Param=?&P%O
button=
Code: Select all
C:\WINDOWS\notepad.exe
I write 'asd'.
And it creates just a file named asd. No extension. No nothing.
I'd say there's a mistake in the command line. Or i did something all wrong.
-----------------------------
One more thing:
Is there a quick way to copy the location of current dir, without using the command line?
I always have to click the bar which shows this (just above the file list) twice, and then copy...
You did it correctly, but I forgot that you want .txt appended automatically.
The solution is getting dirty, but you can fix it with additional .bat file.
Call this .bat instead of putfile.
2 notes:
I recommend using %COMMANDER_PATH%, this way you can move TC dir somewhere else and this will keep working.
Even though I said that you should use "path to editor" in "editor" file, notepad is one of a few programs for which name is enough.
The solution is getting dirty, but you can fix it with additional .bat file.
Code: Select all
D:\blabla...\plugins\Putfile\putfile.exe.exe %1.txt
2 notes:
I recommend using %COMMANDER_PATH%, this way you can move TC dir somewhere else and this will keep working.
Even though I said that you should use "path to editor" in "editor" file, notepad is one of a few programs for which name is enough.
Correct Param is %Pwppr wrote: [the dialogue gives the name of the selected item + &P before it!]
instead of &P
Param=?%P%O
? means: show the dialog so the user can see whats happend and modify if he wants
%P means: path of the selected file
%O means: file name-part of the selected file (without the extension)
%N means: whole file name of the selected file
Press F1 while in button setup dialog for more.
NO, that's fine. You have to add f.ex. ".txt" your own. So you are flexible.I write 'asd'.
And it creates just a file named asd. No extension. No nothing.
I'd say there's a mistake in the command line. Or i did something all wrong.
OR... you could use f.ex.:
%P%O.txT
And while hover f.ex. over "TOTALCMD.EXE" you would get an new file "TOTALCMD.txT"
(Great f.ex. to create description text files for downloaded EXEs or archives)
If you add this '?' again as first char to "?%P%O.txt"
you see the dialog again and have the change to modify the name of the new file.
--------
For the fine putfile you can use:
Code: Select all
[em_NewFilePUTFILE] ; file 'editor' with path to editor
cmd=%commander_path%\Plugins\NewFilePutFile\putfile.exe
Param=?%O
button=
Or use the build-in feature "Shift+F4" to create a new file and open it with an editor.
The editor could be set in the TC-preferences "Viewer/Editor"
If you press "Shift+F4" while over an other file, the this name is suggested in the dialog-box.
-----------------------------
Don't fear to open an new threat for each single question. (First search the forum with different keywords)One more thing:
Is there a quick way to copy the location of current dir, without using the command line?
I always have to click the bar which shows this (just above the file list) twice, and then copy...
Look in the "TOTALCMD.INC" file for all commands.
Search for "cm_CopyToClipboard" and another.
With this commands you can create buttons, or assign an short cut, or add it to the menu like:
Code: Select all
MENUITEM "...&Dateinamen", cm_CopyNamesToClip
MENUITEM "...Dateinamen mit &Pfad", cm_CopyFullNamesToClip
MENUITEM "...Dateinamen mit &UNC-Pfad", cm_CopyNetNamesToClip
Thank you Stefan2, this was exactly what i wanted.
m^2, must say i don't understand the bat command you gave me.
But i did as you said. I made a .bat next to putfile.exe with the
and made a new TC command, like this
I've tried all changing and removing the parameters and editing the .bat - no luck.
And I won't be trying any more. This is already overly complicated, and i've wasted enough of our time.
It was fun , but no more... Not everything has to be perfect.
I'll be using your putfile.exe and Shift+F4, depending on the needs.
I cannot thank you enough.
Bye.
m^2, must say i don't understand the bat command you gave me.
But i did as you said. I made a .bat next to putfile.exe with the
Code: Select all
D:\blabla...\plugins\Putfile\putfile.exe.exe %1.txt
Code: Select all
[em_NewTxt]
Cmd=%COMMANDER_PATH%\plugins\Putfile\putfile.bat
Param=?%O.txt
And I won't be trying any more. This is already overly complicated, and i've wasted enough of our time.
It was fun , but no more... Not everything has to be perfect.
I'll be using your putfile.exe and Shift+F4, depending on the needs.
I cannot thank you enough.
Bye.