aabout2008 当前离线
列兵
77七 当前在线
中校
@echo off rem 保存为ansi编码 cd /d "%~dp0" set "oldstr=a" set "newstr=b" for /f "delims=" %%i in ('dir /b /a-d') do ( if "%%i" neq "%~nx0" ( set n=%%~ni if defined n ( call ren "%%i" "%%n:%oldstr%=%newstr%%%%%~xi" ) ) ) pause复制代码
TOP
@echo off set folder_path=%~dp0 set output_file=%~dp0\Output.txt dir /b "%folder_path%\*" > "%output_file%" pause复制代码