1.

Solve : Need help with a batch im making.?

Answer»

You can try this which works in a similar way: save it all as select.bat or similar

Note that none of the titles can have illegal filename characters in the name. < > / \ : " | etc

EDIT: I changed this code to SUPPORT more than one screenfull of titles and you press space to SCROLL through pages.

Code: [Select]:: Boondocks
:: One Piece
:: Fullmetal Alchemist
:: Naruto
:: Naruto (Shippuden)
:: Boondocks
@echo off
title Main Menu
color 0A
:startofbatch
cls
echo ================================================================================
del temp.list 2>nul
for /f "tokens=1,* delims=: " %%a in ('findstr /n "^::" "%~f0"') do echo %%a) %%b >>temp.list
type temp.list|more
del temp.list 2>nul
echo ================================================================================
set "NUM="
set /p "num=Choose a Show (press enter to QUIT): "
if not defined num goto :EOF
set "show="
for /f "tokens=1,* delims=: " %%a in ('findstr /n "^::" "%~f0" ^|findstr "^%num%:" ') do set "show=%%b"

if not defined show (
echo show not found, try again
pause
goto :startofbatch
)

:loop
cls
if not exist "%show%.txt" >"%show%.txt" echo 0
set /p num=<"%show%.txt"
echo "%show%" - seen %num% episodes
set "seen="
set /p "seen=Enter a number to add (press enter to return to main menu) : "
if not defined seen goto :StartOfBatch
set /a num=num+seen
>"%show%.txt" echo %num%
goto :loop



Discussion

No Comment Found