TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: Chris Robinson
from: John Beckett
date: 2003-06-26 11:00:38
subject: Re: Batch File Question

From: John Beckett 

Chris Robinson  wrote in message
news::
> IF %ERRORLEVEL% EQU 1 goto _POSSVIRUS

I think your problem is that fc does not set errorlevel under NT4 (fc does
set errorlevel under W2k). A trick follows. I haven't checked this much.

BTW it is confused to say:
IF ERRORLEVEL 0 GOTO _NOVIRUS
because "if errorlevel 0" is always true.

---begin---
dir c:\testdir > testdir-current.txt rem Put following two lines on ONE
LINE. fc /L c:\testdir-clean.txt c:\testdir-current.txt |
   find "FC: no differences encountered"
if errorlevel 1 goto IsDif

echo No differences found.
goto :eof

:IsDif
echo Differences found.
goto :eof
---end---

For the test to be helpful, your NT4 computer needs Guest enabled with a
blank password, or Administrator with a blank password, or other hideous
stuff. I think you are supposed to install Snort instead of a make-your-own
honeypot.

John

--- 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™.