See below for comments:
echo. This script is counting the # of POSTs.
echo. The POST # value is saved in TEST.txt.
echo.
call:myPOSTTest
MSDOS doesn't support the call :label syntax
for /f "tokens=* delims=" %%x in (A:\TEST.txt) do echo POST# %%x
MSDOS doesn't support the extended for
commands
echo. &pause&goto:eof
MSDOS doesn't support the &
command separator or the goto :eof
link
::--------------------------------------------------------
::-- Function section starts below here
::--------------------------------------------------------
:myPOSTTest - here starts my function identified by its label
set var=0
if EXIST A:\TEST.txt (
for /f %%x in (A:\TEST.txt) do (set /a var=%%x+1)
)
MSDOS doesn't support the compound expressions in parentheses or the set /a
enhancement
echo %var% >> A:\TEST.txt
goto END
:END