Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Command Line Batch/Script Anyone?? (Read 3450 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Command Line Batch/Script Anyone??

I would like to be able to have a batch file or perl script do the encoding for me in windows, but I haven't figured out how to get this to work.

Basically, I just want to start the encoding from a batch file and specify the input and output directory, encode everything using APS, then when it's done, go back and do a second encode using a lower bitrate for my portable.

If I can get the first half to work, the second part is academic. Is there an option for selecting an input and output directory? I can't seem to get this to work.

flac > schiit modi > schiit magni > hd650

Command Line Batch/Script Anyone??

Reply #1
The bones of what you want are in perl script LAMEB, downloadable at

Command Line Batch/Script Anyone??

Reply #2
@echo off
if "%1"=="" goto end
if "%2"=="" goto end
if "%3"=="" goto standard
for %%f in (%1*.wav) do lame --alt-preset 100 %%f
move /y %1*.mp3 %3
for %%f in (%1*.wav) do lame --alt-preset standard %%f
move /y %1*.mp3 %2

Windows batchfile syntax is maybe not the most intuitive, but I wouldn't say it's rocket science either.

Command Line Batch/Script Anyone??

Reply #3
You 'da man!! Thanks for that batch file. Also, thanks to the previous poster for the link to LameB.

I think that I can now do this.

It would be great if LAME had a command line option for selecting a directory. Heck, if the WMA encoder can do it, surely LAME could.
flac > schiit modi > schiit magni > hd650

Command Line Batch/Script Anyone??

Reply #4
For Linux there are a lot of perl scripts available (ripit etc...) which let you encode a bunch of cds all at once. Unfortunatly EAC (for Windows) does not support a command line mode. Therefore you can't control your ripping proccess through a single perl script which is bad imho.