幾個用於配合winamp使用,更加方便地播放mp3的批次處理
使用的時候請修改批次處理中所有的set winamp="winamp.exe"為你的winamp.exe的全路徑。
play.bat
程式碼:
@echo off
set winamp="winamp.exe"
for %%a in (%*) do start "winamp" %winamp% "%%~fa"
使用例子:假設在c:\mp3的指令行視窗下,可以用play .來播放當前目錄下的所有文件,或者用play *.apl的方式用萬用字元來播放某些文件。
add.bat
程式碼:
@echo off
set winamp="winamp.exe"
for %%a in (%*) do start "winamp" %winamp% /ADD "%%~fa"和上面的play.bat類似,只不過增加了/ADD參數,用於把文件增加到播放列表中。
下面是一個配合TC使用的指令碼:
程式碼:
@echo off
REM Batch file for Total Commander
REM Installation: put this batch file on TC's toolbar and set its parameter as %L
REM Usage: select some music files and click the icon of this batch file on TC's toolbar
if [%*]==[] goto:eof
set winamp="winamp.exe"
for /f "delims=" %%a in (%*) do call:sub1 %%a
goto:eof
:sub1
set var=%*
set lastchar=%var:~-1%
if %lastchar%==\ set var=%var:~0,-1%
start "winamp" %winamp% "%var%"使用方法:把上面的程式碼存為一個批次處理文件,比如play_for_tc.bat,然後把這個文件移到到TC的工具條上,修改其執行參數為%L,然後在TC中選項一些文件,點擊這個工具條上的按鈕即可播放了。
|