Ross Levis
2002-Jan-07 13:44 UTC
[vorbis] >Why not use OggDrop? Going for managed bitrates? T agging?
Philip M. White wrote:>>FOR %%1 IN (*.wav) DO oggenc -q 4 --artist="Dido" > This is wonderful, Christopher. > One last question: is there a way to use the loop > control variable value inside the loop? Since the loop > counter begins with one and is incrementing each time (I'm > assuming), I should probably use that value as the track > number and serial number to save myself time later. > Is there a way to do that, like in C/C++'s for() loop?Not really. %%1 simply takes the value of each file. There is no simple way of incrementing a number, except for one messy way. Change the existing batch file to contain: set ARTIST=Dido set TRACK=1 for %%f in (*.wav) do call ogg.bat %%f Then create a new batch file called ogg.bat with the following: oggenc -q4 -a %ARTIST% -N %TRACK% if %TRACK%==15 set TRACK=16 if %TRACK%==14 set TRACK=15 if %TRACK%==13 set TRACK=14 if %TRACK%==12 set TRACK=13 if %TRACK%==11 set TRACK=12 if %TRACK%==10 set TRACK=11 if %TRACK%==9 set TRACK=10 if %TRACK%==8 set TRACK=9 if %TRACK%==7 set TRACK=8 if %TRACK%==6 set TRACK=7 if %TRACK%==5 set TRACK=6 if %TRACK%==4 set TRACK=5 if %TRACK%==3 set TRACK=4 if %TRACK%==2 set TRACK=3 if %TRACK%==1 set TRACK=2 One thing to note, the files will encode in the order they appear in the directory (dir *.wav), and not necessarily in alphabetical order. If the directory was empty before hand then it should be OK. Ross. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.