简单批处理for,重命名当前文件夹下某文件 @echo off for /f %%i in ('dir /s /b "*.txt"') do (ren "%%~pi%%~ni.txt" "%%~ni" copy "%%~pi%%~ni.txt" "out\%%~ni.txt")