TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: All
from: Chris Robinson
date: 2003-06-26 09:52:40
subject: Re: Batch File Question

From: Chris Robinson 

OK, I've now changed the file to use DIR /B.  I've also changed the
ERRORLEVEL lines to read:

IF %ERRORLEVEL% EQU 1 goto _POSSVIRUS IF %ERRORLEVEL% EQU 0 goto _NOVIRUS

I can see this running in the command window (just - it flashes up
quickly), and the it still doesn't seam to work. However, I can see (in the
command window) that whenever it runs, the ERRORLEVEL is always 0, whether
the files match or not.  So it does work, it's just that the ERRORLEVEL is
always 0 - odd?

Any further ideas on this or another way to go about it?

Thanks again,
Chris.

Chris Robinson wrote:

> > > dir c:\testdir > testdir-current.txt
> > > fc /L c:\testdir-clean.txt c:\testdir-current.txt
> > >
> > > IF ERRORLEVEL 1 GOTO _POSSVIRUS
> > >
> > > IF ERRORLEVEL 0 GOTO _NOVIRUS
> > >
> > > :_POSSVIRUS
> > > NET SEND mypcname File detected
> > > EXIT
> > >
> > > :_NOVIRUS
> > > EXIT
> > >

--- BBBS/NT v4.01 Flag-4
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270
@PATH: 379/45 1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.