I'm trying to create a batch file, that asks for user input, then executes a few other command line programs based on that input.
Anyways, I'm not exactly a programmer, so I found a sample script that I figured would work, and it does, but all the choices are numbers, and I'm trying to get it to accept file names instead.
So instead of
[code]Type the number to print text.1[/code]
It would be
[code]Type the number to print text.File Name Here[/code]
But it only seems to work with numbers and individual letters.
This is the script I based this off of, minus the end of it, which doesn't matter for this question.
[code]@ECHO off
cls
:start
set choice=
set /p choice=Type the number to print text.
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto hello
if '%choice%'=='2' goto bye
if '%choice%'=='3' goto test
ECHO "%choice%" is not valid please try again[/code]
If I need to use a new command, or maybe not use a batch script and use vbscript or something instead, I'm open to it.
But any help would be greatly appreciated.
[insert comment about how using batch is inferior to another language even though you need help in batch]
Sorry, you need to Log In to post a reply to this thread.