反复sort也只是以最后一个为准,如果sort一次提取一次的话无疑是舍本逐末。
如果要求不高,可以浅尝辄止;否则还是利用 random 来得好。
如果要求不高,可以浅尝辄止;否则还是利用 random 来得好。
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
精华I
查看 17,364 回复 54
Originally posted by zh159 at 2006-12-10 14:29:
把俺最新的也加入这贴吧^_^
@echo off
for /f "delims=" %%i in ('dir/a-d/b *.mp3') do call set $%%random%%$%%i=$
for /f "tokens=1,2* delims=$=" %%i in ('set $ ...
@echo off
for /f "delims=" %%i in ('dir/a-d/b/s *.mp3,*.wma,*.ape') do call set $%%random%%$%%i=$
for /f "tokens=1,2* delims=$=" %%i in ('set $') do "C:\Program Files\MPlayer\mplayer.exe" "%%j"@echo off
for /r . %%i in (*.mp3,*.wma,*.ape) do call set $%%random%%$%%i=$
for /f "tokens=1,2* delims=$=" %%i in ('set $') do "C:\Program Files\MPlayer\mplayer.exe" "%%j"@echo off
(for %1 %%i in (*.mp3,*.wma)do call echo %%random%%=%%i)%3>nul&%2:EOF
for /f "tokens=2delims==" %%a in ('"%~0" /r,goto,2^|sort')do echo %%a@echo off&%~1
for /f "tokens=2delims==" %%a in ('%~0 "(for /r %%i in (*.mp3,*.wma)do call echo %%^random%%=%%i)&goto:EOF"^|sort')do echo %%a