88.txt的行数要小于等于子文件夹数:- @echo off
- setlocal enabledelayedexpansion
- for /f "delims=" %%i in ('dir /b /ad') do set _!random!=%%i
- set _>temp
- (for /f "delims=" %%i in (88.txt) do (
- set /p str=
- for /f "tokens=1* delims==" %%a in ("!str!") do ren "%%b" "%%b%%i"
- ))<temp
- del temp
- pause
复制代码 代码未经测试,请备份好源文件。 |