hola, me ha surgido un problema con un archivo de procesamiento por lotes (.bat) hasta ahora funcionaba con Windows 98, tenia un pequeño fichero .bat en el que se podía elegir entre varias opciones , usaba "Choice" pero ahora en XP no me reconoce el comando, alguien sabe si existe un comando para esto en win XP?
Gracias
problemas con win XP y .bat
Moderador: Moderadores
Re: problemas con win XP y .bat
@echo off
:start
cls
set /p userinp=choose a number(1-6):
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto 1
if "%userinp%"=="2" goto 2
if "%userinp%"=="3" goto 3
if "%userinp%"=="4" goto 4
if "%userinp%"=="5" goto 5
if "%userinp%"=="6" goto 6
echo invalid choice
goto start
:1
(do stuff here)
goto end
:2
(do more stuff here)
goto end
:3
stuff
goto end
etc.
:end
pause>nul
:start
cls
set /p userinp=choose a number(1-6):
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto 1
if "%userinp%"=="2" goto 2
if "%userinp%"=="3" goto 3
if "%userinp%"=="4" goto 4
if "%userinp%"=="5" goto 5
if "%userinp%"=="6" goto 6
echo invalid choice
goto start
:1
(do stuff here)
goto end
:2
(do more stuff here)
goto end
:3
stuff
goto end
etc.
:end
pause>nul