回复 9# 单车少男
- @echo off
- cd /d "%~dp0"
- setlocal enabledelayedexpansion
- for /f "delims=" %%i in ('dir /b /a-d "*v*.*"') do (
- set file=%%i
- for /f "delims=" %%a in ("!file:v=/!") do (
- set /a n=%%~na+1,m=1000000+%%~na
- set #"!file:v%%~nxa=!"#"!m!"=!file:%%~nxa=!!n!%%~xi
- )
- )
- for /f "tokens=1-3 delims=#=" %%a in ('set # ^|sort /r') do (
- if not defined _"%%~a" (
- set _"%%~a"=1
- cd.>"%%c"
- start "" "%%c"
- timeout 2
- )
- )
- endlocal
- pause
复制代码
|