九溪

溪水润知林,滴露启慧心

用户工具

站点工具


wiki:windows:windows-bat-for-filelist

Windows 批处理 遍历文件列表内容

待处理内容在 list.txt 中

deal.bat
@echo off
 
setlocal enabledelayedexpansion
 
set fileList=list.txt
 
set /a copyCount=0
 
for /f "delims=" %%l in (%fileList%) do (
 
set /a copyCount+=1
 
echo dealing %%l

rem 这里写执行语句

rem echo "for /r %sourcePath%\%%l in (%%a*) do xcopy %%a %targetPath% /y"
 
echo.
)
 
echo Total num is %copyCount%.
 
echo Work is done.
 
echo.
pause

评论

请输入您的评论. 可以使用维基语法:
 
wiki/windows/windows-bat-for-filelist.txt · 最后更改: 2023/01/03 15:25 由 127.0.0.1