Thread: How to a script my program in DOS

  1. #1
    Registered User
    Join Date
    Nov 2005

    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
    what are those two telnet lines supposed to do?

  3. #3
    Registered User
    Join Date
    Mar 2005
    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
    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
    Northern Virginia/Washington DC Metropolitan Area
    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:

    C:\>copy con test.bat
    echo Hello World
    echo How are you?
    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:
    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
    Replies: 4
    Last Post: 01-10-2002, 12:42 PM
Website Security Test