I have no knowledge of your executables, however, a quick search revealed their command line options:
ww2ogg input.wav [-o output.ogg] [--inline-codebooks] [--full-setup]
[--pcb packed_codebooks.bin]
revorb <input.ogg> [output.ogg]
From that information, I'd suggest that you try this sort of methodology, (Rem
arks included as explanation):
@Echo Off
Rem Define the location for ww2ogg.exe.
Set "WemToOggPath=C:\SomeLocation\ww2ogg024"
Rem Define the location for revorb.exe.
Set "MyRevorbPath=C:\SomeLocation"
Rem Exit if the required executables and input files are not available.
If Not Exist "%WemToOggPath%\ww2ogg.exe" Exit /B 1
If Not Exist "%MyRevorbPath%\revorb.exe" Exit /B 1
If Not Exist "%~dp0input\*.wem" Exit /B 1
Rem Create output directory if it does not already exist along side this script.
If Not Exist "%~dp0output\" MD "%~dp0output"
Echo -------------------------------------------------------------------------------------
Rem Loop through each .wem file located inside the a directory named input along side this script.
For %%I In ("%~dp0input\*.wem") Do (
Rem Run ww2ogg.exe against each .wem file outputting them to the same directory but with an .ogg extension.
"%WemToOggPath%\ww2ogg.exe" "%%I" -o "%%~dpnI.ogg" --pcb "%WemToOggPath%\packed_codebooks_aoTuV_603.bin"
Rem If the last ww2ogg.exe process was successful then.
If Not ErrorLevel 1 If Exist "%%~dpnI.ogg" (
Rem If there is still a .wem file delete it.
If Exist "%%I" Del "%%I"
Rem Run revorb.exe against the .ogg file outputting it to the output directory along side this script.
"%MyRevorbPath%\revorb.exe" "%%~dpnI.ogg" "%~dp0output\%%~nI.ogg"
Rem If the last revorb.exe process was successful and there is still a matching .ogg file inside the input directory delete it.
If Not ErrorLevel 1 If Exist "%%~dpnI.ogg" If Exist "%~dp0output\%%~nI.ogg" Del "%%~dpnI.ogg"
)
)
Echo -------------------------------------------------------------------------------------
Pause
As I don't know those utilities, I have tried to assume nothing, so if your conversion processes are not leaving the unconverted files behind, the script could probably be made smaller.
Please read through the Rem
arks to understand exactly what it does, before you run it, and most importantly, ensure that you modify C:\SomeLocation
on lines 3
and 5
to those which hold your two executables. (Please do not leave trailing path separators on those directories). I would then suggest that you try the script from within a test input
directory, and against some copied .wem
files, before attempting it in your production environment.