How to a script my program in DOS

This is a discussion on How to a script my program in DOS within the C Programming forums, part of the General Programming Boards category; I know on telnet when i script i do this: script *FilenameOfScript* cat *FilenameIWantToScript* But i don't understand how i ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    10

    How to a script my program in DOS

    I know on telnet when i script i do this:

    script *FilenameOfScript*
    cat *FilenameIWantToScript*


    But i don't understand how i do it in DOS...

    Anyone know how to?

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    what are those two telnet lines supposed to do?

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    140
    script records all terminal ouput to a file until ctrl^D or the exit command
    I don't know a DOS equivalent.

    you can use
    Code:
    type *FilenameIWantToScript*
    as a cat equivalent
    Last edited by spydoor; 11-14-2005 at 08:16 AM.

  4. #4
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,794
    If I understand what you're saying, the DOS equivalent would be to use "copy con". For example, if you were to type the following at the prompt:

    Code:
    C:\>copy con test.bat
    echo Hello World
    echo How are you?
    ^Z
    The above creates a file called test.bat in the root that contains the two echo commands. The ^Z is the control-Z character and ends the capture of the text (you don't actually type in ^Z). I think "con" is supposed to mean "console".

    test.bat contents:
    Code:
    echo Hello World
    echo How are you?
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. Client-server system with input from separate program
    By robot-ic in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-16-2009, 02:30 PM
  3. compiling a program that has no configure script
    By serfurj in forum Linux Programming
    Replies: 9
    Last Post: 02-09-2005, 09:53 AM
  4. initialising a DOS program from a C enviroment
    By Robert_Ingleby in forum C Programming
    Replies: 5
    Last Post: 03-07-2002, 12:53 PM
  5. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 12:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21