本帖最后由 CrLf 于 2012-8-6 14:03 编辑
- @echo off
- cd aa
- for /f "delims=" %%a in ('
- dir /a-d /b^|findstr "^[0-9][0-9][0-9][0-9][0-9][0-9][^0-9.]"
- ') do (
- setlocal enabledelayedexpansion
- for %%b in (!random!!random!!random!) do endlocal&set "$%%b=%%~a"
- )
-
- for /f "delims==" %%a in ('set $ ') do (
- set /a n+=1000001
- setlocal enabledelayedexpansion
- ren "!%%a!" "!n:~-6!!%%a:~6!"
- endlocal
- )
- pause
复制代码
|