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

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"