At 12:24 PM 6/12/2002, Thomas E. Hall wrote:

I was wondering does F-Prot have daily downloadable virus updates?  If not
what virus software do you recommend if you want to schedule jobs to run to
make sure that we have the latest updates.  Or should we use 2 virus
checkers.

I don't remember who originally wrote this and posted it to the list, but I've been using it ever since, and it works perfectly. Updates both F-Prot program files and the virus updates, and checks for updates every 30 minutes. I've modified it a bit, so YMMV.

rem Update of F-Prot update program to eliminate redundant downloads.
rem Requires info-zip's unzip.exe 5.42 www.info-zip.org
rem Requires gnu wget, links to Windows binaries at www.wget.org or www.cygwin.com
rem Will keep the last three versions of f-prot on disk.

SETLOCAL

:Set Path Info
SET fprotdrv=c:
SET fprotdir=\program files\fsi\F-Prot
SET DownloadDir=%fprotdrv%%fprotdir%\Zips

:Set Unzip Command Info
SET unzipcmd=UNZIP -o -u
SET unziptail=-x f-prot.pif -d "%fprotdrv%%fprotdir%\Updates"

:Set FTP Info
SET wgetcmd=c:\winnt\wget.exe
SET BaseURL=ftp://ftp.f-prot.com/pub

:CheckDirectories
md "%fprotdrv%%fprotdir%"
md "%fprotdrv%%fprotdir%\Updates"
md "%DownloadDir%"
if not exist "%DownloadDir%" goto end

:FTPDownload
%wgetcmd% -t 2 -N -nv -P "%DownloadDir%" %BaseURL%/fp-3*.zip %BaseURL%/fp-def.zip %BaseURL%/macrdef2.zip  2>&1 | find "in 0 files"
if errorlevel 1 goto UnzipFiles
goto end

:UnzipFiles
SET T=0
for /F %%I in ('dir "%DownloadDir%\fp-3*.zip" /a-d-s /b /o:-d') do call :DoNewVersion "%DownloadDir%\%%I"
%unzipcmd% "%DownloadDir%\fp-def.zip" %unziptail%
%unzipcmd% "%DownloadDir%\macrdef2.zip" %unziptail%
copy /y "%fprotdrv%%fprotdir%\Updates\*.def" "%fprotdrv%%fprotdir%"
copy /y "%fprotdrv%%fprotdir%\Updates\*.asc" "%fprotdrv%%fprotdir%"
copy /y "%fprotdrv%%fprotdir%\Updates\*.exe" "%fprotdrv%%fprotdir%"

:Cleanup
attrib -r "%DownloadDir%\*.zip"
if exist "%fprotdrv%%fprotdir%\f-prot.pif" del "%fprotdrv%%fprotdir%\f-prot.pif"
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
echo %T%
goto :EOF

:END
ENDLOCAL

_______________________
Scott MacLean
[EMAIL PROTECTED]
ICQ: 9184011
http://www.nerosoft.com

Reply via email to