- @echo off
- setlocal enabledelayedexpansion
- for /f %%i in ('WMIC OS get LocalDateTime ^| findstr [0-9]') do set "dt=%%i"
- set "s=QWERTYUIOPASDFGHJKLZXCVBNM"
- for /L %%i in (0 1 3) do (
- set /a n = "!Random! %% (26 - %%i)"
- for %%j in (!n!) do for %%k in (!s:~%%j^,1!) do set "s=!s:%%k=!" & set "str=!str!%%k"
- )
- echo;%dt:~0,8%-%str%
- pause
复制代码
|