
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard][ Last edited by zw19750516 on 2008-4-24 at 07:25 PM ]@echo off&setlocal enabledelayedexpansion
for /f "delims=:" %%i in ('dir /s /b d:\*.mp3 ^|findstr /n .*') do set list=%%i
set /a m=%random%%%%list%+1
for /f "delims=" %%i in ('dir /s /b d:\*.mp3') do (
set /a n+=1,
if !n! equ %m% start "%%i"
)
CODE: [Copy to clipboard][ Last edited by zw19750516 on 2008-4-25 at 08:05 AM ]@echo off&setlocal enabledelayedexpansion
for /f "tokens= 1* delims=:" %%i in ('dir /s /b d:\*.mp3 ^|findstr /n .*') do set list=%%i&set puth=%%~dpj
:begin
set n=0&set /a m=%random%%%%list%+1
for /f "tokens=3,4 delims= " %%i in ('dir /s /a-d d:\*.mp3 ^|findstr "mp3"') do (
set /a n+=1
if !n! equ %m% (
set bt=%%i&set bt=!bt:,=!&set /a t=!bt!/12800
start %puth%%%j
ping /n !t! 127.1>nul
taskkill /f /im ttplayer.exe>nul
goto begin
)
)
CODE: [Copy to clipboard]@echo off
setlocal enabledelayedexpansion
mode con cols=18 lines=3
color 1e
title 音乐试听
:again
set z=0
for /f "delims=" %%a in ('dir /s/b/a-d "d:\kugoo\mp3\*.mp3"') do (
set /a z+=1
set fen!z!="%%a"
)
:ming
set /a ming=%random%%%200+1
if %ming% gtr !z! goto ming
start "" /min "c:\program files\windows media player\wmplayer.exe" !fen%ming%!
:aaa
echo.
set /p x= y换歌, n退出:
if /i %x%==y goto more
if /i %x%==n goto out
cls&goto aaa
:more
taskkill /f /im wmplayer.exe /t 1>nul 2>nul
cls&goto again
:out
taskkill /f /im wmplayer.exe /t 1>nul 2>nul
mode con cols=85 lines=25
color
exit /b
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |