----- Original Message -----
From: "Thomas E. Hall" <[EMAIL PROTECTED]>
Sent: Monday, July 15, 2002 2:59 PM
Subject: RE: [Declude.Virus] Virus software

> Has anyone writen a ftp script to auto-update Trend Micro's PCscan virus
> def's?
>
Here as an attachment and in-line. 
 
This grabs the beta pattern files as written.  Should just be a matter of changing the wget target to use release patterns.
 
Jerry
 
 
:=====  BEGIN CUT HERE =====
 
rem update
 
rem This script is distributed in the hope that it will be useful,
rem but WITHOUT ANY WARRANTY; without even the implied warranty of
rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
rem
rem USE AT YOUR OWN RISK!
 
SETLOCAL
 
:Set Path Info
SET TrendBetadrv=D:
SET TrendBetadir=\vscan\TrendBeta
SET TrendBeta=%TrendBetadrv%%TrendBetadir%
SET DownloadDir=%TrendBeta%\update
 
:Set Unzip Command Info
SET unzipcmd=E:\UTIL\UNZIP -o -u
SET unziptail= -d %TrendBeta%
 
:Set FTP Info
SET wgetcmd=e:\cygwin\bin\wget.exe
SET BaseURL=ftp://download.antivirus.com/products/pattern/cpr/lpt*.zip
 
:CheckDirectories
md %TrendBeta%
md %DownloadDir%
if not exist %DownloadDir% goto end
 
:FTPDownload
%wgetcmd% -t 2 -N -nv -P %DownloadDir% %BaseURL% 2>&1 | find "in 0 files"
if errorlevel 1 goto UnzipFiles
goto end
 
:UnzipFiles
SET T=0
for /F %%I in ('dir %DownloadDir%\lpt*.zip /a-d-s /b /o:-d') do call :DoNewVersion %DownloadDir%\%%I
 
:Cleanup
attrib -r %DownloadDir%\*.zip
SET T=0
for /F %%I in ('dir %TrendBeta%\lpt$vpn.* /a-d-s /b /o:-d') do call :DeleteOldVersions %TrendBeta%\%%I
goto end
 
:DoNewVersion
SET /a T = 1+%T%
if %T% EQU 1 %unzipcmd% %1 %unziptail%
if %T% LEQ 3 goto :DoNewVersion_exit
if exist %1 del /F %1 
:DoNewVersion_exit
goto :EOF
 
:DeleteOldVersions
SET /a T = 1+%T%
if %T% GEQ 6 if exist %1 del /F %1
goto :EOF
 
:END
ENDLOCAL
:=====  END CUT HERE =====

Attachment: updtrend.zip
Description: Zip compressed data

Reply via email to