Using Inputs in Batch

January 22, 2012 at 15:42:18
Specs: Windows 7
Hello, Recently I've use a line of code in a batch file.

if %m%==1 echo G1=%WHERE% >> MCML.cfg

Now, As you can see this code takes an User Input and creates a file with that information in it.
The next think that I would like to do that I have difficulties finding is how to use the information in that file.

I not sure of code able to be used to load up that file and use the information in it for that batch file.


set /p WHERE=
echo UNO=%WHERE% >> Hello.cfg
goto A

REM //This is where I need the command to load up the file and use the information inside.
java -Xincgc -Xmx1024M Xms1024M -cp %UNO%.jar

If you could help me with this I would be very thankful.


See More: Using Inputs in Batch

Report •

January 22, 2012 at 23:46:48
Alright, its good. I found out a easy fix.
For anybody who peeks in for a answer to their own problem here is fix.
(This only works if you just want one line out of the file)

/p set M=
echo %M% >> Util.txt
goto A

set /p C=< Util.txt
echo Input is %C%

This line of code takes the file and uses it as the user input in :A.

Thank you!

Report •
Related Solutions

Ask Question