Serge:

"if errorlevel 0" means "if errorlevel >= 0". You are NOT comparing to
"equal" - it will return TRUE if the error level is AT LEAST the number 0 -
which is true for any positive value.

Best Regards,
Andy

-----Original Message-----
From: supp...@declude.com [mailto:supp...@declude.com] On Behalf Of Serge
Sent: Sunday, February 08, 2009 7:50 PM
To: declude.junkm...@declude.com
Subject: Re: [Declude.JunkMail] Errorlevel not working

Hello sandy

Not true
even if i comment echo line, i still get "gzip OK errorlevel 0, Unzipping "
even if the file if corrupted


gzip -d -f -t zydt3crn.snf.gz
if errorlevel 0 goto gziperr0
if errorlevel 1 goto gziperr1
GOTO END

:gziperr0
Echo gzip OK errorlevel 0, Unzipping
GOTO END

:gziperr1
Echo gzip errorlevel 1
Echo gzip .gz file did not test OK
GOTO END

:END


----- Original Message ----- 
From: "Sanford Whiteman" <sa...@cypressintegrated.com>
To: "Serge" <declude.junkm...@declude.com>; "Message Sniffer Community" 
<sniffer@sortmonster.com>
Sent: Monday, February 09, 2009 12:39 AM
Subject: Re: [Declude.JunkMail] Errorlevel not working


> I have a problem with the branching in the batch below
> even when the test fails and "echo %errorlevel% " shows 1
> the branching still goes to gziperr0
> Does enyone knows why and how to fix ?

When  you  echo  the  errorlevel, the errorlevel is reset to the value
returned by echo().

--Sandy



------------------------------------
Sanford Whiteman, Chief Technologist
Broadleaf Systems, a division of
Cypress Integrated Systems, Inc.
e-mail: sa...@cypressintegrated.com

SpamAssassin plugs into Declude!
 
http://www.imprimia.com/products/software/freeutils/SPAMC32/download/release
/

Defuse Dictionary Attacks: Turn Exchange or IMail mailboxes into IMail 
Aliases!
 
http://www.imprimia.com/products/software/freeutils/exchange2aliases/downloa
d/release/
 
http://www.imprimia.com/products/software/freeutils/ldap2aliases/download/re
lease/



---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to imail...@declude.com, and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.




---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to imail...@declude.com, and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.




#############################################################
This message is sent to you because you are subscribed to
  the mailing list <sniffer@sortmonster.com>.
To unsubscribe, E-mail to: <sniffer-...@sortmonster.com>
To switch to the DIGEST mode, E-mail to <sniffer-dig...@sortmonster.com>
To switch to the INDEX mode, E-mail to <sniffer-in...@sortmonster.com>
Send administrative queries to  <sniffer-requ...@sortmonster.com>

Reply via email to