我一直在尝试编写一个批处理代码,该代码将:
我试图编写一个访问 txt 文件以获取该值的程序;但该值不会增加。
@echo off
echo.This script is counting the # of POSTs.
cd "C:\Users\HP-M6\Documents"
for /f "tokens=* delims=" %%x in (TEST.txt) do echo %%x
call:myPOSTTest
for /f "tokens=* delims=" %%x in (TEST.txt) do echo %%x
echo.&pause&goto:eof
::--------------------------------------------------------
::-- Function section starts below here
::--------------------------------------------------------
--
:myPOSTTest - here starts my function identified by it's label
cd "C:\Users\HP-M6\Documents"
for /f "tokens=* delims=" %%x in (TEST.txt) do (
set %x%+=1
)
goto:eof
Run Code Online (Sandbox Code Playgroud) batch-file ×1