Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

DOS session saved to a file?

May 25, 2005 5:00AM PDT

Hi,

I am running repetitive command line tests and got to thinking if there was a way to save the contents of an entire DOS session (in Windows XP) to a file. I remember doing this using a command called "script" in Unix during college.

Not sure whether this command is available for use on WinXP.

Thanks.

Discussion is locked

- Collapse -
No but.
May 25, 2005 5:44AM PDT

I get very close if I have OpenSSH installed on some machine and I ssh in. That's a terminal program and it is possible to log terminal sessions.

Best of luck,

Bob

- Collapse -
OpenSSH in windows
May 25, 2005 11:33AM PDT

Hi Bob,

To clarify, are you suggesting that if I installed OpenSSH on my WinXP laptop and then initiated a session (a session to the same machine (loopback ip 127.0.0.1?)) that I will be able to log that session and that it would still be able to run all the commands and programs that I would normally be able to run in a CMD.exe window?

If yes, any freeware openssh ports for WindowsXP that you recommend?

Thanks!

- Collapse -
Sorry, but I offer no gurantee, warantee or such statements.
May 25, 2005 11:53AM PDT

All I can share is that for the command line work I need to do, this works for me. I was offering it as a possible solution and can never state or offer any assurance of performance or suitability. Such is for you to discover.

Sorry, but you seem to want some ironclad statement that everything will work. But I can't offer that since we are using the work of thousands and it is too likely that someday, something won't work.

However, the putty OpenSSH I use was found with ease on google and serves me quite well. You'll have to test it out to see if it fits your needs.

Bob

PS. Where's my lawyer?

- Collapse -
Call the lawyers....Not!
May 26, 2005 4:06AM PDT

Sorry Bob,

Sincere apologies. I really didn't mean it like that. What I was curious about was the ability to use DOS-like commands inside an OpenSSH shell - My (mis?)conception was that OpenSSH was kinda like a secure telnet and I might be getting restricted to using Unix commands or some such. I really apologize for sounding so "demanding".

Thanks for the OpenSSH implementation recommendation.

Also, while surfing for a solution - I came across an app called TCAP32 which saves a log of your DOS session into a file - unfortunately in the readme it says it doesn't work with WinXP or Win2000. (So, for all you Win9Xers, try it out... ) I downloaded it and tried it - the file ended up 0 size on WinXP.

- Collapse -
I use OpenSSH or putty to a Windows 2000/XP machine.
May 26, 2005 6:48AM PDT
- Collapse -
Dos can use redirection
Apr 29, 2006 1:35PM PDT

I am not sure if this fits your need.

tracert www.yahoo.com > filename.txt

This command will do a trace route to yahoo.com and redirect the output to a text file name filename.txt.
That is probably as close to the script command that you are going to get.

SKrall