Is there a way to log a DOS/CMD prompt?

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

Post Reply
User avatar
Top Wop
DBB Master
DBB Master
Posts: 5104
Joined: Wed Mar 01, 2000 3:01 am
Location: Far from you.
Contact:

Is there a way to log a DOS/CMD prompt?

Post by Top Wop »

Title says all.

Any utility where I can log a DOS or a WinNT CMD window kind of what they have in Linux?
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6458
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

in NT, it has that, but only for the current session, and it works weird. try hitting the up and down keys.

I guess you could hit cygwin.com, and get yourself a bash shell.
MD-2389
Defender of the Night
Defender of the Night
Posts: 13477
Joined: Thu Nov 05, 1998 12:01 pm
Location: Olathe, KS
Contact:

Post by MD-2389 »

Just to add onto what flip said, you can set how many lines it'll keep in its buffer.
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6522
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

Post by Jeff250 »

For command-specific logging, you can just add " > [filename]" to your commands.

I.e.
dir > test.txt
will save the directory contents to text.txt.
DigiJo
DBB Ace
DBB Ace
Posts: 491
Joined: Thu Jul 18, 2002 2:01 am
Location: Germany
Contact:

Post by DigiJo »

omg just wanted to post the same.

other options are possible,

dir >prn

prints the result if your printer supports dos printing, dir /p shows it page by page etc.
works for most other commands too.
User avatar
CDN_Merlin
DBB_Master
DBB_Master
Posts: 9757
Joined: Thu Nov 05, 1998 12:01 pm
Location: Capital Of Canada

Post by CDN_Merlin »

dir /more does page by page also
MD-2389
Defender of the Night
Defender of the Night
Posts: 13477
Joined: Thu Nov 05, 1998 12:01 pm
Location: Olathe, KS
Contact:

Post by MD-2389 »

Merlin, don't ya mean "dir | more"?
User avatar
CDN_Merlin
DBB_Master
DBB_Master
Posts: 9757
Joined: Thu Nov 05, 1998 12:01 pm
Location: Capital Of Canada

Post by CDN_Merlin »

yes, sorry it's the pipe symbol.
Delkian
DBB Ace
DBB Ace
Posts: 200
Joined: Mon Dec 31, 2001 3:01 am
Location: Helsinki, Finland
Contact:

Post by Delkian »

There's no need to list all different command-line options for different commands, though, just list one: "foo /?" gives information on command-line parameters and stuff for foo.

Doesn't apply to pipes, of course, since they aren't parameters for commands.

Also, Win2k (and I guess XP and stuff) seems (to my little experience) to finally have filename completion by pressing tab.

Though I don't really see much use for the command line in Windows except for some pretty simple commands (ping, tracert, ipconfig...), but I guess it can be useful sometimes.
Post Reply