- @echo off
- set "z=a b c d e f g h i j k l m n o p q r s t u v w x y z"
- for /f "delims=" %%a in ('dir /b *^|findstr /vc:"%~nx0"') do (
- set k=
- set wenben=%%~na
- set wenjian=%%a
- setlocal enabledelayedexpansion
- for /l %%b in (0,1,50) do (
- set zimu=!wenben:~%%b,1!
- for %%c in (!z!) do (
- if /i "!zimu!"=="%%c" set k=!k!!zimu!
- )
- )
- ren "!wenjian!" "!k!%%~xa"
- endlocal
- )
- pause
复制代码
|