Creating a file from TC?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
BIGPILOT
Junior Member
Junior Member
Posts: 13
Joined: 2003-11-26, 13:36 UTC

Creating a file from TC?

Post by *BIGPILOT »

One of the things I'm missing from TC is to create a file (text, document, etc.) like in Windows Explorer.
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

IMO it's possible.
Just click in the panel with the right button of the mouse and you will get the context menu with a "NEW..." item.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
Leif
Senior Member
Senior Member
Posts: 328
Joined: 2003-02-05, 15:44 UTC
Location: Umeå, Sweden

Post by *Leif »

Or Shift+F4, insert file name et voilà
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Why is notepad popping up after creating a new file? Quite annoying.
Can one suppress that?

Icfu
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

icfu wrote:Why is notepad popping up after creating a new file? Quite annoying.
Can one suppress that?

Icfu
That depends on the extension you give for the new file. And why do you create a new file if you dont want to edit it?
I switched to Linux, bye and thanks for all the fish!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

That does NOT depend on extension as TC has no options for different F4 editors, this thread is about editors, not viewers... There is only one standard behaviour for F4, default is notepad.

So if I don't wanna edit the new file with notepad but with some different editor there is always one window opened I have no use for and therefore I always have to manually close it.

Icfu
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I thought you mean the New... menuitem.
I switched to Linux, bye and thanks for all the fish!
User avatar
Coco
Senior Member
Senior Member
Posts: 223
Joined: 2003-02-07, 13:35 UTC
Location: Belgium
Contact:

Post by *Coco »

shift+F4 will indeed always edit the newly created file with the default editor. If you don't want this you should use the right click (like suggested by djk). To use the right button don't forget to change in the option the mouse selection mouse.

Sometimes I also want to create empty file so I encounter the same "issue".
Alain
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Workaround:
Make a new start menu entry, name it 'newfile' or whatever.
Command: cmd.exe /c @echo off>newfile.txt

After that redefine hotkey Shift-F4 to cm_usermenu1 (or whatever number the entry is) under Configuration-Misc.

Now a new file named newfile.txt will be created when pressing Shift-F4 in active panel.
Attention: An exisiting file named newfile.txt will be overwritten without confirmation!

For mouse lovers a button with 'cmd.exe /c @echo off> newfile.txt' will work, too, of course.

No internal command for making a new file? Would be somewhat better I think...

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

Post by *Hacker »

cmd.exe /c @echo off>newfile.txt
...
Attention: An exisiting file named newfile.txt will be overwritten without confirmation!
Maybe
cmd.exe /c @echo off>>newfile.txt
would take care of the overwriting issue?

HTH
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.
oblomov
Junior Member
Junior Member
Posts: 98
Joined: 2003-04-04, 15:41 UTC

Post by *oblomov »

cmd.exe implies WinNT ... what about using

touch filename

then?
User avatar
havanna
Member
Member
Posts: 163
Joined: 2003-02-27, 08:06 UTC
Location: Baden/Württemberg

Post by *havanna »

any kind of commandline that can be piped should do

cls > new.fud will create a file named new.fud that contains just one byte hex "0C"

nul> new.txt creates an empty file named new.txt (annoyingly the windows "open with..." Dialog pops up, but that takes only one keystroke on esc.
Tanstaafl
Post Reply