Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
vvomble
- Posts: 9
- Joined: 08 Jul 2013 07:07
#1
Post
by vvomble » 30 Jul 2013 13:40
Can't seem to get this to work right for me now i'm wondering if it is possible to do.
Code: Select all
:itemspec
echo.
echo Which platform would you like to mod?
echo 1 Nes
echo 2 Master System
echo please enter category number
set /p %platform%=
if %platform%== 1 set %platform2%=Nes"
if %platform%== 1 goto Nes
if %platform%== 2 set %platform2%=MasterSystem
if %platform%== 2 goto MasterSystem
If still a complete noob at batch so not sure what the do's and don't's are yet other than this is a don't (otherwise this would work)
Thanks in advance
-
vvomble
- Posts: 9
- Joined: 08 Jul 2013 07:07
#3
Post
by vvomble » 30 Jul 2013 14:18
that didn't work it still shows as
-
jeb
- Expert
- Posts: 1043
- Joined: 30 Aug 2007 08:05
- Location: Germany, Bochum
#4
Post
by jeb » 30 Jul 2013 14:22
Code: Select all
if "%platform%"=="1" set platform2=Nes
Is better ...
At the left side of the equal sign of a SET command should only be the name without percents.
The same is true for the
-
vvomble
- Posts: 9
- Joined: 08 Jul 2013 07:07
#5
Post
by vvomble » 30 Jul 2013 14:39
unfortunately neither of those were right although the
wasn't something I'd spotted. thanks
-
vvomble
- Posts: 9
- Joined: 08 Jul 2013 07:07
#6
Post
by vvomble » 30 Jul 2013 22:34
Any other ideas guys as so far this is drawing a blank. Your patience and time are appreciated guys oh and girls
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#7
Post
by foxidrive » 30 Jul 2013 23:58
Give this a crack. Assuming it is not inside a loop:
Code: Select all
:itemspec
set "platform="
set "platform2="
echo.
echo Which platform would you like to mod?
echo 1 Nes
echo 2 Master System
set /p "platform=please enter category number: "
if "%platform%"=="1" set "platform2=Nes" & goto Nes
if "%platform%"=="2" set "platform2=MasterSystem" & goto MasterSystem
if not defined platform2 goto :itemspec
-
vvomble
- Posts: 9
- Joined: 08 Jul 2013 07:07
#8
Post
by vvomble » 31 Jul 2013 00:16
thanks that worked it's been bugging me for days