批处理遍历文件并执行操作

2024-11-08 03:11:01
推荐回答(4个)
回答(1):

@for /f "tokens=* delims=" %%i in ('dir /s /b /a-d *.dll') do ABC.EXE -r "%%i"

回答(2):

@echo off
set fn=abc.exe
for /f "tokens=*" %%i in ('dir/s/b *.dll') do "%fn%" -r "%%i"

回答(3):

@for /f "delims=" %%i in ('dir /s /b *.dll') do @"ABC.EXE" -r "%%i"

回答(4):

@echo off
for /f "tokens=*" %%i in ('dir/s/b *.dll') do "abc.exe" -r "%%i"