[Flac-users] Re: my flac -t issue: next approach

Kerry Hoath kerry at gotss.net
Sat Dec 7 20:21:01 PST 2002


It can but is probably not as nice as youwould like.
flac -t *.flac
if errorlevel 1 goto fail
goto exit
:fail
echo Danger Will Robinson! Flac files failed integrity check.
:exit


For this reason cygwin and its bash for windows does a lot more.
Notes on the batch file fragment above:

if errorlevel 1 goto
actually means if errorlevel 1 or greater
so don't try if errorlevel 0 since it will allways be the case.
(there are no negative exit codes).
:text denotes a label. we have to goto around a goto because
of the errorlevel limitation sighted above.
This method won't tell you which files passed or failed.
No there is no easy way to send standard error to a file so you can
look at it; well not under command.com anyway.
Cygwin will let you do it and there might be a wrapper utility somewhere
on the simtel repository to do it as well; I think
it is in sysutils or textutils in the msdos section.
There might be a way to cludge around all this in Windows by using Perl and getting it
to flac -t a file at a time but I honestly think
cybwin would be easier.

Regards, Kerry.
On Sat, Dec 07, 2002 at 04:54:22PM -0600, David W. Tamkin wrote:
> | yes, the exit code will be 1 if any of the flac files failed
> | testing, else 0 (i.e. if all of them passed).
> 
> Thank you, Josh!  Now the only trick is to see whether command.com can do
> anything with that information.
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Flac-users mailing list
> Flac-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flac-users
> 

-- 
Kerry Hoath:  kerry at gotss.net kerry at gotss.eu.org or  kerry at gotss.spice.net.au
ICQ: 8226547 msn: kerry at gotss.net Yahoo: kerryhoath at yahoo.com.au





More information about the Flac mailing list