I would like to write a batch file that runs the cmd line
” lame.exe [options] [infile] [outfile]”
on a folder of .wav files.
something like
FOR %%f IN (dir *.wav) DO (lame.exe -V0 -h %%f.wav %%f.mp3)
of course that’s wrong but…how do I generate the correct [infile] [outfile] arguments for this?
I tried the above, and got all kinds of syntax errors. The problem happens if you have spaces in your file names. Thus, this would be a more generally useful batch file:
Note, in my example I’m also using lower quality for compressing audiobook files for minimum size, and so I can drop the batch file in my wav folder, I put the full path to lame negating the need to set a path environment variable. The key change is quotes around the filename arguments.