回复 apang
00001-00001.jpg
估计蓝色部分不一定是5位吧
find 发表于 2012-3-12 22:23
以“-”作为判断依据,如何?- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%f in ('dir/b/a-d *.jpg') do (
- set "name=%%~nf"
- call :loop
- if exist !name!\nul move "%%f" "!name!"
- )
- goto :eof
-
- :loop
- if not "!name:~-1!"=="-" set "name=!name:~,-1!"&goto loop
- set "name=!name:~,-1!"
复制代码
|