@echo off
set PERFORMER=群星
set TITLE=DTS 5.1 环绕360度情境音乐
set EXT=WAV
REM 处理 mp3 时 CUE 添加的文件个数 限定 99个 超过就 foobar2k 认为是无效文件
REM 如果文件名前面01 xxx 去掉 01 时选择 3 默认 0
set START_POS=0
REM 去掉扩展名 *.WAV 时 -4 *.FLAC 时 -5
set STOP_POS=-4
setlocal enabledelayedexpansion
echo PERFORMER "%PERFORMER%">list.cue
echo REM DATE 2012>>list.cue
echo TITLE "%TITLE%">>list.cue
dir *.%EXT%/b/w/n/on>all_name.txt
set /a count=0
for /f "delims=" %%i in (all_name.txt) do (
set /a count=!count!+1
if !count! lss 10 ( set tn=0!count! ) else ( set tn=!count!)
echo FILE "%%i" WAVE>>list.cue
echo TRACK !tn! AUDIO>>list.cue
set name=%%i
echo TITLE "!name:~%START_POS%,%STOP_POS%!">>list.cue
echo PERFORMER "%PERFORMER%">>list.cue
echo FLAGS DCP>>list.cue
echo INDEX 01 00:00:00>>list.cue
)
del all_name.txt