本帖最后由 DAIC 于 2015-11-25 18:07 编辑
- @echo off
- setlocal enabledelayedexpansion
- for %%a in (*.txt) do (
- (for /f "delims=" %%i in ('type "%%a"') do echo !random!!random!!random! %%i)>"%temp%\x"
- sort /o "%temp%\y" "%temp%\x"
- (for /f "tokens=1*" %%i in ('type "%temp%\y"') do echo,%%j)>"%temp%\z"
- move /y "%temp%\z" "%%a"
- )
- del /f /q "%temp%\y" "%temp%\x"
复制代码
|