1

これが逆境に苦しんでいる私の.batです。名前を付けましょうb.bat

set loopnum=%1
set url=%2
del "%TEMP%\selectortemp.txt"
del "%TEMP%\selectortemp2.txt"
for /r %loopnum% %%i in (\*.*) do echo %%~ni%%~xi>>"%TEMP%\selectortemp.txt"

echo %loopnum%
pause

set count=0
for /f "usebackq delims=" %%a in (%TEMP%\selectortemp.txt) do set /a count+=1

set /a count2=1
:looping

for /f "tokens=1,2 delims==" %%a in (%config%) do (if %%a==url set url=%%b)

set /p firstline=<"%TEMP%\selectortemp.txt"

del "%url%\%firstline%"

echo "%firstline%"
pause

for /f "skip=1 tokens=*" %%A in (%TEMP%\selectortemp.txt) do echo %%A>>"%TEMP%\selectortemp2.txt"
del "%TEMP%\selectortemp.txt"
rename "%TEMP%\selectortemp2.txt" "selectortemp.txt"

if %count2%==%count% goto endlooping
set /a count2+=1
goto looping
:endlooping

まず、次のように呼びます。

for /l %%i in (0,1,3) do (call b.bat %%i C:\testing)
4

1 に答える 1