改文件名批处理 @echo off setlocal enabledelayedexpansion for /f "delims=" %%a in ('dir /a-d/b *.txt') do ( set "var=%%~na" echo !var!%%~xa set ne