HydrogenAudio

Lossless Audio Compression => Lossless / Other Codecs => Topic started by: ManInTheDark on 2018-12-03 04:27:24

Title: WAV to APE via BAT file ()How to do it?)
Post by: ManInTheDark on 2018-12-03 04:27:24
I'm trying to find info that'll allow me to create Monkey's Audio files from WAV files via a BAT file, but can't find any info here about it, or on the web. Does anybody know how to do it?
Title: Re: WAV to APE via BAT file ()How to do it?)
Post by: probedb on 2018-12-03 10:40:01
Is this of any use? Options for EAC but the cmd line should be similar.

https://hydrogenaud.io/index.php/topic,98556.0.html
Title: Re: WAV to APE via BAT file ()How to do it?)
Post by: Case on 2018-12-03 11:13:22
You compress with a bat file the same way you convert on command prompt. How complex a file you need depends on what you are trying to achieve. Here's a sample script to convert dropped files to APEs into the same directory where the WAV files are in.

Code: [Select]
@echo off
:loop
mac.exe "%~1" "%~d1%~p1%~n1.ape" -c2000
shift
if not ."%~1"==."" goto loop
Title: Re: WAV to APE via BAT file ()How to do it?)
Post by: ManInTheDark on 2018-12-03 15:44:52
Created a BAT file with the info you provided, and it worked. I was able to modify it so that the command prompt box stayed around until I closed it by adding two lines at the end:

Code: [Select]
@echo off
:loop
mac.exe "%~1" "%~d1%~p1%~n1.ape" -c3000
shift
if not ."%~1"==."" goto loop
:end
pause

I found, though, that if I added the -v command, it converted without verifying at all. I ended up having to create a seperate BAT file just to do that.

Code: [Select]
@echo off
:loop
mac.exe "%~d1%~p1%~n1.ape" -v
shift
if not ."%~1"==."" goto loop
:end
pause

Is there a way to combine the two into one BAT file that creates, then verifies an ape file? If not, I'm perfectly happy with using the two seperate BAT file to do everything.
Title: Re: WAV to APE via BAT file ()How to do it?)
Post by: Case on 2018-12-03 15:55:11
You can add the verification line 'mac.exe "%~d1%~p1%~n1.ape" -v' after the compression line.
Title: Re: WAV to APE via BAT file ()How to do it?)
Post by: ManInTheDark on 2018-12-04 04:42:50
Ended up with this:

Quote
@echo off
:loop
mac.exe "%~1" "%~d1%~p1%~n1.ape" -c3000
mac.exe "%~d1%~p1%~n1.ape" -v
shift
if not ."%~1"==."" goto loop
:end
pause


And I got this result:


Quote
--- Monkey's Audio Console Front End (v 4.40) (c) Matthew T. Ashland ---
Compressing (high)...
Progress: 100.0% (0.0 seconds remaining, 5.2 seconds total)
Success...
--- Monkey's Audio Console Front End (v 4.40) (c) Matthew T. Ashland ---
Verifying...
Progress: 100.0% (0.0 seconds remaining, 6.3 seconds total)
Success...
Press any key to continue . . .


Finally, it works! Thanks for the assistance, guys.