Solved batch help _userinput variables to choice

November 5, 2011 at 14:15:02
Specs: Windows XP

Hello iam trying to accomplish
the goal is to get all categorys with any logic increment combined as output to write it at the bottom of the file, to make them accessable in Choice with newstart of batch.
I had to think a long time to at least get to that point so please no destructive comments but after 2 weeks pulling my hairs out i need advice...


set Category=NONE
echo Into wich category you want to Output this maps?
set /p NEWCategory=
echo You added the Category %NEWCategory%

echo set %NEWCategory%=??help?? >> "%BatME%"
// this line is my troublemaker in wich way i can set and increase a value for the variable i try to generate, the writing process works fine

in case one of you is clever and nice enough to have beginner friendly solution for it you maybe would like to add how i can build then the structure of a Choice interface ( if possible alphabetically sorted by categoryname)
To gain something like:
Mainmenu, wich category you would like to choose , list "All" known categorys as options
and offer the Manual entry for "new" category as additional but secondary choice as usual ( last option) press n to create "new" category or so.

::::::::::::NOPES not the End:::::::
set Stone Floors=??help?? well this is the end of code here i store for now variables i assumed i will need to build the choice menu tried it with .bat and external textfile before but ouldnt get the input back to main in the right way but i would definaitly agree a secondary file would keep things tidy.

i hope anyone can see what my issues are, and guide me in the right direction, plain reading of commands just makes me brain dead at this point.

Thank you in advance for every feedback

Sorry for this unproffessional post... First Forum Steps lol

See More: batch help _userinput variables to choice

Report •

November 6, 2011 at 07:23:12
//if you are trying to create a marker?

//as in

set BatME=0
set BatME=%BatME% + 1 ?

//not sure if this what you need


Report •

November 6, 2011 at 08:51:16
✔ Best Answer
Actually that must be coded as

set BatME=0
set /A BatME+=1

Report •

November 6, 2011 at 08:54:50
Thankyou, my appologies, rushed through it


Report •

Related Solutions

November 6, 2011 at 18:42:30
Hello, First of all thank you for the fast replys.
The layout here confused me a while so i couldnt see that i have any answers up to the moment where i checked my mails back...
thank you both for the solution of mathemathial increment i solved it for now with:

set /a Num=0

:Add Count
set /a num=%Num%+1
echo Current Value for Count is %Num%

:echo %Num% > "%BatCount%" // should send number of count to batcount

::works perfect first line gets overwritten and with reset or next start of batch i try to load it as Actual %Num%

:::call %BatCount% for /a %%a do( set /a Num=%%a:::::::issue here now
echo Current Value for Count is: %Num%
echo Loading done!

i found after a while that sumone else tried it in a similar way but i cannot adapt the technic
obviously the This For loop breaks my neck since i seem to stumble consequently about it
i will attach the link to the "Head" script as this user called it

The topic is leading to confusion eventually but i examined the function of the counter there in order to make mine working without luck.
If somone is able to explain the file reading/ eventually i should say appending functions specially for this case, i would really apreciate it.
Also iam asking for your input because i try just to store a single number i see a second bat file in general as "overtuned" would there be a form that allows to write and replace a line within the same file store num as value and variable, i know it from things like exel and other applications, codelanguages in theorie it should be possible, any example about storing data to particular line in same file and read it again for further use, would be very apreciated as well, in order to see what will be the technically nicer solution...

Btw: If someone is that kind to write or to crosslink to a general explanation for dummies like me, about file writing/reading/appeding it would be awsome to use no matemathical calculations fot this explanation, due to the fact that my brain simply cant handle math very well. words phrases suffixes fine and +1 i could manage as well :) )
And further i hope that i answer here again in the right tab iam sorry if not and would apreaciate the acording corrections to be taken by forum admin or send to me in order to correct it)

Also i see it looks a little offtopic right now in general with that title so i will try to leave the ready code here at the end that "Really" is related with the title userinput variables to Choice.

Thank you for your help.. youre all amazing!

edit: Sorry for playing with votes had to find out what it is ad what it does (if anyone feels offended, please complain), and hopefully its still possible for you to answer even if its marked as solved :/

Report •

Ask Question