CODE: [Copy to clipboard]
@echo off
setlocal enabledelayedexpansion
mode con cols=18 lines=3
color 1e&title 音乐试听
set "num=0"
taskkill /f /im wmplayer.exe /t 1>nul 2>nul
for /r "d:\kugoo\mp3" %%a in (*.mp3) do (
set /a num+=1
set "msc!num!=%%a"
)
:again
set /a "rdm=%random%%%%num%+1"
start "" /min "d:\program files\windows media player\wmplayer.exe" "!msc%rdm%!"
echo.
set "choi="&set /p choi=回车换歌,其它退出:
if not defined choi goto :more_
taskkill /f /im wmplayer.exe /t 1>nul 2>nul
exit
:more_
taskkill /f /im wmplayer.exe /t 1>nul 2>nul
cls&goto :again