Skip to main content

Notice

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: How to batch encode several Wav+Cuesheets? (Read 4234 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to batch encode several Wav+Cuesheets?

Sorry if I am repeating some one else's question; if so, please direct me to thread. I have a bunch of wav cd images with cue sheets and status reports, all in the same folder with wavpack files. Is there a way - with additional "tag-ware" or something - to automate the compression of the wav files with embedded cuesheets?

All files (wav,cue) are identically named --> Made In Japan (disc 1).wav and Made In Japan (disc 1).cue
So far the only options have been for me to:
- batch encode all the .wav files to wavpack and then embed the cue sheets one by one in Foobar2000, or
- keep one .wav file and its related .cue file in Wavpack.exe's working directory; then remove the resulting compressed file (w/ embedded cue sheet) and the actual remaining cue sheet; and so forth for each album

Is there a simpler way so that I do not have to do this manually for each album? I'd appreciate if anyone could help.

Merci d'avance.


Note: I have been following this forum for a couple of years now as a guest and finally decided to join so I could ask questions. With enough info, I could play around with scripts or whatever solution might enable me to do this.

How to batch encode several Wav+Cuesheets?

Reply #1
Hmm, I don't think there's a real easy way to do that. The command to do one album would be:

> wavpack "Made In Japan (disc 1).wav" -w "CUESHEET=@Made In Japan (disc 1).cue"

So you could create a batch file to do several, but you'd have to enter the names for each one.

Someone more experienced with batch files would probably be able to create a batch file that was smart enough to do this automatically (with "for / each" or whatever it is).

Right now you can use a wildcard in the name of the cue file, but it only works if there's only one match. Maybe it would be nice (and intuitive) if it would also work if there were many matches but one of the matches was the same name as the input file. Then you could do a whole folder of these with one command; I think about that as a feature.

In the meantime, sorry I couldn't help more. 

David

How to batch encode several Wav+Cuesheets?

Reply #2
Use this script to encode your files:
Code: [Select]
set encoder="E:\audio\wavpack\wavpack.exe"
for /r "." %%d in (.) do (cd %%d & for %%f in (*.wav) do %encoder% "%%f" -w "CUESHEET=@%%~nf.cue" )

Copy contents to a text file, change the path to wavpack.exe and save it as "encode.cmd" to the folder with your wav files to encode, run by simply double-clicking. The script will look in the base and all subfolders recursively and encode all wav files with corresponding cuesheets.

How to batch encode several Wav+Cuesheets?

Reply #3
Thanks Egor,

It seems to work well so far with the three I have tried.

Thanks a ton!

How to batch encode several Wav+Cuesheets?

Reply #4
Just a note to say that so far, I have been encoding over 100 wav+embedded cue files using the .cmd file recommended by Egor. It works perfectly well; the only thing that has happened occasionally is a "wavpack and encountered an error and needs to close..." popup window when the .cue file is missing. But the command just moves on to the next file in the and the process continues just fine.

So thanks again, Egor. I thought I would add this positive feedback in case other users may be thinking about the same or similar situation.

How to batch encode several Wav+Cuesheets?

Reply #5
I usually keep all of my image files in the same folder and do something along the lines of

Code: [Select]
ren *.cue *.wav.cue
for %1 in (*.wav) do wavpack -hmw "CUESHEET=@%1.cue" %1


I think it works quite well, although Egor has obviously found a slightly similar way through a better knowledge of batch scripting!