批处理修改替换文件名 2021-07-20 批处理 12345678@echo offset strtemp3=文件扩展名set strtemp1=被替换字符set strtemp2=替换字符setlocal enabledelayedexpansionfor /f "delims=" %%a in ('dir /a /b *.%strtemp3%') do (set nobird=%%aren "%%~a" "!nobird:%strtemp1%=%strtemp2%!") ps. 字符中包含汉字时,另存bat文件Encoding为ANSI即可。 10 Oct 2016