Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to accept a carriage return in a Batch Script

Status
Not open for further replies.

chieh

Programmer
May 28, 2004
20
CA
Hi:

My friend is working in a firm that uses software written in Fortran 77. He is trying to run a batch script to automate file download on a nightly basis. However the script always stopped and prompt user to hit enter key, i.e. the file dialog shows up waiting for user to hit ok to save the file to the given name and directory. How can he automate this part? Here is the script
:

Batch Script:
=============

! Automatically download fx files to PC
BATCH
PRINT
TXFILE2
PCV FIL H:\
STOP

===============

Thank you.

Chieh.

 
How about trying a redirect on STDIN?

I used to do that quite often.

You create a text file with the reply in it and redirect STDIN to read the text file.

YOURPROGRAM < TEXTFILE.TXT

is the sort of thing I'm talking about.

This assumes you're using a PC.
 
Hi Zei:

I don't think it will work, they are using a PC but they have to login into a terminal program and run the script.

Chieh.
 
Look up "sendkeys appactivate" in VBScript.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top