Using Inputs in Batch

Score
0
Vote Up
January 22, 2012 at 15:42:18 Pacific
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.

Example...

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

:A
cls
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 net.java.LauncherFrame

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

--NiTR0


Reply ↓  Report •


#1
Vote Down
Score
0
Vote Up
January 22, 2012 at 23:46:48 Pacific

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

: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!
--NiTR0


Reply ↓  Report •
Reply to Message Icon Start New Discussion
Related Posts

« How to rename file using ... [Solved] if %var% == 1 goto blah i... »