lgk99 当前离线
列兵
jian123ch 当前离线
上等兵
TOP
DAIC 当前离线
中将
522235677 (张三)当前离线
少校
@echo off setlocal enabledelayedexpansion for /r %%i in (*.txt) do ( set strfn="%%~ni"abc"%%~xi" ren %%i !strfn! )复制代码
@echo off set "str=abc" for /f "delims=" %%i in ('dir /b *.xls') do ren "%%i" "%%~ni%str%%%~xi"复制代码
@echo off & setlocal enabledelayedexpansion set str=abc for /f "delims=" %%a in ('dir /b *.xls') do ren "%%a" "%%~na!str!%%~xa" pause复制代码
@echo off setlocal enabledelayedexpansion for /r %%i in (*.txt) do ( set strfn=%%~ni%%~xi set strfna=!strfn:~0,-4! set strfnb=!strfn:~-4! set strfnew=!strfna!abc!strfnb! ren %%i !strfnew! )复制代码