pgssk 当前离线
列兵
xxpinqz (YiFeng)当前离线
中校
@echo off set/p dst=输入修改数值: if "%dst%"=="" goto :eof rem 看不准你截图上的—是啥符号,自己替换下下面的-号 set "c=-" for /f "delims=" %%a in ('dir /b/a-d *%c%*.doc 2^>nul') do ( for /f "tokens=1,2* delims=%c%" %%i in ("%%a") do ( rem 显示正确后删除echo echo ren "%%a" "%%i%c%%dst%%c%%%k" ) ) pause复制代码
TOP
悬崖之树 当前离线
上尉
@echo off&setlocal enabledelayedexpansion set /p dst=请输入修改值: if not defined dst goto :eof for /l %%i in (10001 1 10999) do ( set i=%%i&set i=!i:~-4! if exist "0312-32-ph1-!i!.doc" ( echo ren "0312-32-ph1-!i!.doc" "0312-%dst%-ph1-!i!.doc" ) ) pause复制代码
@echo off set n=10000 :loop set /a n+=1 set m=%n:~-4% if exist "0312-32-ph1-%m%.doc" ( ren "0312-32-ph1-%m%.doc" "0312-xxx-ph1-%m%.doc" ) else goto :eof goto loop复制代码
@echo off&setlocal enabledelayedexpansion set n=10000 :loop set /a n+=1 set m=%n:~-4% if exist "0312-32-ph1-%m%.doc" ( ren "0312-32-ph1-%m%.doc" "0312-xxx-ph1-%m%.doc" set /a i+=1 if !i! == 20 goto :eof ) goto loop复制代码
for %%a in (0 1 2 3 4 5 6 7 8 9) do ( for %%b in (0 1 2 3 4 5 6 7 8 9) do ( for %%c in (0 1 2 3 4 5 6 7 8 9) do ( for %%d in (0 1 2 3 4 5 6 7 8 9) do ( echo %%a%%b%%c%%d))))复制代码
weichenxiehou 当前离线
ren *.doc ????-33-*.doc复制代码