Operating Systems :: DOS :: How to get input for an executable from batch file? |
|||
| By: progGoon |
Date: 04/02/2003 00:00:00 |
Points: 50 | Status: Answered Quality : Excellent |
|
Hi, I know very primitive shell scripting for windows. And i m working with windows NT. I have an executable which asks for input during processing unlike command line arguments. I need to write a batch file for runnning this executable for few dozen times. Plz tell me: 1. how to get input at prompt by process. 2. is it also possible to enter an alternate input by having checking of some sort. 3. Any good tutorial on-line abt this stuff. Thanks, progGoon |
|||
| By: sumotimor | Date: 05/02/2003 21:56:00 | Type : Answer |
|
| 1. Use the smaller-than (<) sign and then the text with input. E.g. comfile.exe <argument1.txt. The argumentfile will be read one line at a time whenever the app needs it. 2. Depends on the checking. A more powerful alternative for batchfiles would be Kixtart, freely downloadable from the MS website. 3. Dunno for normal batch, but Kixtart comes with extensive manuals and tutorial. Have fun, sumotimor |
|||
| By: progGoon | Date: 05/02/2003 22:19:00 | Type : Comment |
|
| Hi, Can anyone plz tell me wat %1, %2 or variable in between %s means and how to use them. Basically how to use varibles in shell scripting? Thanks, progGoon |
|||
| By: VGR | Date: 05/02/2003 22:37:00 | Type : Assist |
|
| they are the arguments passed on the command-line, in order, and separated by space(s) technically, %0 is the name if the executable itself (BAT, COM, EXE) c:\mybatch.bat filename1.txt process debug will produce in the batch itself : %1=filename.txt %2=process %3=debug I think that values containing space(s) but enclosed in double quotes are treated as a single parameter's value |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








