maluwang 当前离线
列兵
zhanglei1371 当前离线
六级士官
TOP
qixiaobin0715 当前离线
大校
jave000 当前离线
二级士官
@echo off if exist "*~1.*" ( setlocal enabledelayedexpansion for /f "delims=" %%a in ('dir /b /a-d') do ( set "str=%%~na" if not "%%a"=="%~nx0" ( if not "!str:~-2!" == "~1" (del "%%a") else ren "%%a" "!str:~,-2!%%~xa" ) ) ) pause复制代码
@echo off for /f "delims=" %%a in ('dir /b /a-d^|findstr /v "~1"') do ( if exist "%%~na~1%%~xa" ( del "%%a" ren "%%~na~1%%~xa" "%%a" ) ) pause复制代码
@echo off setlocal enabledelayedexpansion for /f "delims=" %%a in ('dir /b /a-d') do ( set "str=%%~na" if not "%%a"=="%~nx0" ( if not "!str:~-2!" == "~1" (del "%%a") else ren "%%a" "!str:~,-2!%%~xa" ) ) pause复制代码