level 1
延缓变量会开启吧,,
echo off
set sInPath=X:\path
setlocal ena...
set nCnt=0
for /f "tokens=*" %%a in ('dir /b /s "%sInPath%"') do (
set /a nCnt=!nCnt! + 1
set "FileList[!nCnt!]=/%%~a"
)
set typeFile=X:\File.txt
set sOtFile=%userprofile%\desktop\sOtFile.txt
echo.>"%sOtFile%"
for /f "tokens=*" %%a in ('type "% typeFile%"') do (
for /f "tokens=2 delims=/" %%b in ('set ^| find /i "FileList[" ^| find /i "%%a"') do (
echo.>> "%sOtFile%"
)
)
2022年06月18日 04点06分