Seeing console output of CLI programs

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
j7n
Member
Member
Posts: 168
Joined: 2005-08-07, 21:56 UTC

Seeing console output of CLI programs

Post by *j7n »

Is it possible to configure the file manager and/or Windows to display console DOS windows by default after a command-line program terminates? Usually these programs output some message that the user has no chance of reading without manually opening CMD and typing the program's name and parameters again, which makes TC's built-in command line not so useful compared to a button that launches CMD.

This appears to be not well thought out in Windows or all programs that integrate CLI tools. I know of only one tool that allows to redirect the output to a file. It could theoretically display it on the interface, but still does not do that.
#148174 Personal license
Running Total Commander v8.52a
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Seeing console output of CLI programs

Post by *hi5 »

I'm guessing it really depends on what you want to do and the utility you are using but:
Q: After the execution of a DOS command such as DIR the window is closed so quickly that the output of the program is unreadable!
A: You can start the program with SHIFT+ENTER instead of ENTER. This leaves the window open after the program terminates. The command will be started via noclose.exe in the Totalcmd directory.
So try to launch your cmd line program by using noclose.exe - example:

Code: Select all

%commander_path%\NOCLOSE.EXE dir
Edit: other method

Add this to your usercmd.ini

Code: Select all

[em_Dir]
cmd=%comspec% /c dir /s /b > dirfile.txt

[em_OpenDirFile]
cmd=cd dirfile.txt
and this as a button

Code: Select all

em_dir,cm_wait 100,em_opendirfile,cm_SrcQuickview
it should show open the quickview of dirfile.txt

Using https://ss64.com/nt/more.html might also he useful
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
j7n
Member
Member
Posts: 168
Joined: 2005-08-07, 21:56 UTC

Re: Seeing console output of CLI programs

Post by *j7n »

Holding Shift works from both a file panel and the command bar! I'm surprised I hadn't accidentally discovered this intuitive shortcut.
#148174 Personal license
Running Total Commander v8.52a
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Seeing console output of CLI programs

Post by *hi5 »

There are many "hidden" gems in TC - a command palette would therefore be nice to make features easier to discover.
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)
Post Reply