delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/1997/11/30/14:26:35

To: MPaul AT calderauk DOT com, opendos AT delorie DOT com, paul-ma AT reze-1 DOT rz DOT rwth-aachen DOT de
References: <s4817eed DOT 069 AT calderauk DOT com>
Message-Id: <AIhfRWqmlI@belous.munic.msk.su>
From: "Arkady V.Belousov" <ark AT belous DOT munic DOT msk DOT su>
Date: Sun, 30 Nov 1997 22:11:39 +0300 (MSK)
Organization: Locus
Reply-To: ark AT mos DOT ru
Subject: Re: OpenDOS 7.02b2 bugs
Lines: 49
MIME-Version: 1.0

X-Comment-To: Matthias Paul

Hi!

30-ξΟΡ-97 14:57 MPaul AT calderauk DOT com (Matthias Paul) wrote to opendos AT delorie DOT com, paul-ma AT reze-1 DOT rz DOT rwth-aachen DOT de:
 > On 97/11/30 MJS wrote:

 > >> 6. COMP.EXE can't work in batches: they not return errorlevels and ask
 > >>    when files differs by size
 > >Using FC might help.

     I check this for OpenDOS FC, but MS-DOS FC is nightmare - no buffering
(try compare without cache!), no differences limit, no ability to pass only
path as second argument (only with mask), spread log, etc. Very bad.

 > BTW, COMP uses the following (known) errorlevels (verified since NWDOS 7):
 >  0 - usual run, even if target file not found, or files have different size
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >  3 - user break ^C
 >  4 - no files found, or source file not found, or syntax error
 > OS/2 COMP returns the following errorlevel:
 > 0 - ok
 > 1 - no files found
 > 2 - file/dir access error
 > 3 - user break ^C
 > 4-  break due fault
 > 5 - files were not equal
 > I have not tested the MS-DOS  errorlevels.
 > Of course, OpenDOS should at least report errorlevel 5 if file are not equal...

     Where you see errorlevel 5 above? Look:

______________O\_/_________________________________\_/O______________
@echo off
comp %1 %2 %3 %4 %5 %6 %7 %8 %9
if errorlevel 1 goto diff
echo compare ok.
goto end
:diff
echo diff!
:end
_____________________________________________________________________
              O/~\                                 /~\O

     Try "cmp file1 file2", where files differs by size or by contents and
watch result (superfluous questions and always "compare ok."). :(

 > PS: For more errorlevel have a look at the BATTIPS.TXT file from my
 > MPDOSTIP.ZIP package...


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019