|
|
|
Reading input from a batch file
|
Original Message
|
Name: Sumanth Sharma
Date: September 9, 2003 at 21:32:04 Pacific
Subject: Reading input from a batch fileOS: Windows 2000 ProfessionalCPU/Ram: P IV 2.4GHz / 512MB |
Comment: How do I input a value using a batch file. For example, In perl i would say $input = ; similairly in a unix shell scrips I will say read input; MY QUESTION IS HOW TO ACHIEVE THIS IN MS-DOS BATCH FILE? HOPE TO GET SOMETHING FROM U'R EXPERTISE.
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Matt
Date: September 10, 2003 at 05:50:31 Pacific
|
Reply: (edit)Step 1> Turn off your CAPS please - thank you! Step 2> For a batch file, input has to be given at command line, and stored as an environment variable. Unless there are new batch file rules that I'm not aware of that is. What exactly are you trying to accomplish? That will help me understand this and help you a bit better. Thanks!
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
|
Reply: (edit)Say, in a batch file I want to invoke a perl script. But before this I wan't to ask the THANKS FOR REPLYING, AND THANKS IN ADVANCE IF U REPLY FOR THIS user something like "are you sure u want to run this script, which will delete all your temporary internet files Y/N" NOW FROM THIS POINT ON, I WAN'T TO TAKE AN INPUT YES OR NO FROM THE USER, HOW DO I ACCOMPLISH IT IN A BATCH FILE
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
|
Reply: (edit)Error in my last reply. Ignore it. THANKS FOR REPLYING, AND THANKS IN ADVANCE IF U REPLY FOR THIS Say, in a batch file I want to invoke a perl script. But before this I wan't to ask the user something like "are you sure u want to run this script, which will delete all your temporary internet files Y/N" NOW FROM THIS POINT ON, I WAN'T TO TAKE AN INPUT YES OR NO FROM THE USER, HOW DO I ACCOMPLISH IT IN A BATCH FILE
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: Matt
Date: September 10, 2003 at 06:25:31 Pacific
|
Reply: (edit)Are you familiar with the Choice command and error levels? Very easy to use really - some resources below: http://www.computerhope.com/choicehl.htm http://www.computerhope.com/batch.htm
Report Offensive Follow Up For Removal
|
Use following form to reply to current message:
|
|

|