Text Input Box in a Batch File
|
Original Message
|
Name: R475
Date: January 22, 2007 at 13:22:22 Pacific
Subject: Text Input Box in a Batch FileOS: Win2KCPU/Ram: .Model/Manufacturer: . |
Comment: In my batch file (see code below) the Xname variable is set by a command line parameter. How would I go about prompting the user with a text input box and have the Xname variable set by the text given in the input box? <code> @Echo Off Set Folder="\rename" Set Xname=%2 For %%A in (%Folder%\xx1cxt00xx*.txt) Do Call :REN %%A GoTo :EOF :REN Set File=%~nx1 Ren %Folder%\%File% %Xname%%File:~10% GoTo :EOF </code>
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: IVO
Date: January 22, 2007 at 13:34:21 Pacific
Subject: Text Input Box in a Batch File |
Reply: (edit)No input boxes in batch scripts as they are command line code. To prompt for an input string code Set /P Xname=Enter New Filename^> And by the way what is the %1 parameter?
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: R475
Date: January 22, 2007 at 14:09:35 Pacific
Subject: Text Input Box in a Batch File |
Reply: (edit)The %1 parameter is left over from previous code, I'm trying to figure out right now how to take it out of my code and still have the code work.
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: