I am trying to automate converting some old wav files to MP3 to free up storage using LAME encoder. Unfortunately, I am not having much sucess. I am using the following command:
forfiles /p "c:\wavfiles" /s /m *.wav /c "cmd /c c:\lame\lame.exe -q5 @path" This works, however it outputs the files into the same folder as the wav files. This makes it necessary to then move the files in a different process. There has to be a better way.
Ideally, I would like to output the MP3 files to a different drive using the same folder structure using a single batch file.
I thought about using:
forfiles /p "c:\wavfiles\" /s /m *.wav /c ^&cmd /c C:\lame\lame.exe -q5 @path" &robocopy C:\wavfiles\ E:\converted *.mp3 /create /s /mov
However this does not seem to work, and seems rather inefficient.
I also thought about perhaps using the @relpath variable to copy the folder structure, so that I could try something like this:
forfiles /p "c:\wavfiles" /s /m *.wav /c "cmd /c c:\lame\lame.exe -q5 E:\@relpath"
However I'm not sure how to do this. Any assistance would be appreciated. Thank you.