- @echo off
- setlocal enabledelayedexpansion
- ::筛选“最后一个分隔符都是 - ”
- for /f "delims=" %%a in ('dir /a-d /b ^|find /v ".bat"') do (
- set "t=%%~na"
- set "t=!t:-=,!"
- for %%b in (!t!) do set "str=%%bfedcba9876543210"
- set /a len=0x!str:~14,1!
- call :mo "%%a" !len!
- )
- pause
- :mo
- set name=%~n1
- set name=!name:~,-%2!
- if not exist "!name![%~x1]\" md "!name![%~x1]\"
- move %1 "!name![%~x1]\"
- goto :eof
复制代码
|