回复 9# shimuren
拖拽N个txt到bat上- @echo off & setlocal enabledelayedexpansion
- :deal
- for /f "delims=" %%a in ("%~1") do (
- set fn=%%~na
- set ext=%%~xa
- for /f "tokens=1-3* delims=," %%i in ("!fn!") do (
- set /a n=%random%%%1000& set m=000!n!
- set bnum=B!date:~2,2!!date:~5,2!!date:~8,2!!m:~-4!
- for /f "tokens=3 delims=:" %%x in ('find /c /v "" "%~1"') do set nnum=%%x
- ren "%~1" "%%i,%%j,%%k,!bnum!,N!nnum:~1!!ext!"
- )
- )
- shift
- if "%~1" neq "" goto deal
- pause & exit /b
复制代码
|