#378 go.bat Improvements Needed

open
nobody
None
5
2012-12-12
2011-03-29
Anonymous
No

On my system (W7 x64), the frontend completely fails to encode/decode files.

Here is an example of go.bat generated by the frontend:
--------------------------------------------
@echo off
win2dos "C:\FLAC\go.bat"
Z:
cd "Z:\somewhere\"
flac -V --replay-gain -6 "input.wav"
echo.
Tag.exe --auto --comment "Encoded by FLAC v1.1.4a with FLAC Frontend v1.7.1" "Z:\somewhere\input.flac"
--------------------------------------------

After it changes to the destination directory its attempts to execute flac.exe and tag.exe fail, since those programs don't exist there. I don't understand how this would ever work on any system...

Here is a fixed version:
--------------------------------------------
@echo off
win2dos "C:\FLAC\go.bat"
Z:
cd "Z:\somewhere\"
"C:\FLAC\flac" -V --replay-gain -6 "input.wav"
echo.
"C:\FLAC\Tag.exe" --auto --comment "Encoded by FLAC v1.1.4a with FLAC Frontend v1.7.1" "Z:\somewhere\input.flac"
--------------------------------------------

But why not just do this?
--------------------------------------------
@echo off
win2dos go.bat
flac -V --replay-gain -6 "Z:\somewhere\input.wav"
echo.
Tag.exe --auto --comment "Encoded by FLAC v1.1.4a with FLAC Frontend v1.7.1" "Z:\somewhere\input.flac"
--------------------------------------------

By the way, the frontend should really be writing this file to the temporary directory..

Discussion