Here is a version that we have used that works great too - http://www.utdallas.edu/~pauls/scripts.html for updating DATs, Engines, etc.Also, if you are interested... Here is an automated batch script that only works on NT/2K for checking for new .DAT files via FTP. Just set it up on AT or MSTASK and you should be good to go..
FTPCHECK.BAT
code:
@ECHO OFF
::FTPCHECK.BAT - by Kent Dyer
::Original version published on Brainbuzz.com on 12/20/2000
:: http://itresources.brainbuzz.com/tutorials/tutorial.asp?t=S1TU1071&tn=Check+if+FTP+file+has+changed&pi=S4C16&pn=95%2F98%2FNT+Batch+Files
:: New version on 6/21/01 - Adds in ability to get files if there are changes!
::FTP into the site using a script
ftp -s:%0\..\login.sc ftp.nai.com::Create variables to check
FOR /F "tokens=*" %%A IN ('TYPE %0\..\new ^| SORT') DO set new= %%A
FOR /F "tokens=*" %%B IN ('TYPE %0\..\old ^| SORT') DO set old= %%B
::Are the Files equal??
IF %new% == %old% GOTO FILESEQ
IF NOT %new% == %old% GOTO FILESNEQ
:
o Nothing
:FILESEQ
ECHO FILES ARE EQUAL
GOTO END
::Create alert
:FILESNEQ
ECHO FILES ARE NOT EQUAL
::Go Grab the new files
ftp -s:%0\..\newfiles.sc ftp.nai.com
::Send an alert
%0\..\postie.exe -host:smtp.server.com -to:mail@domain.com -from:"DATCheck" -s:"DAT Update has arrived." -msg:"%new% has arrived at Network Associates"
::The file is newer and copy to new so we don't get told about it till the next update
COPY new old > NUL
GOTO END
:END
Login.sc file (FTP Commands). Note the ls line as gets the zip file and copies it to the location where the BAT is being executed from. You could also use mdir. You may also need to a y on the next line from ls.
code:
anonymous
user@domain.com
cd pub/datfiles/english/
ls *.zip \\machine\d$\batch\new
bye
Newfiles.sc file (FTP Commands).
code:
anonymous
user@domain.com
cd /pub/antivirus/datfiles/4.x
::Turn Prompting off - Needed for Microsoft FTP clients. UNIX should be turned off.
prompt
Mget sdat*.*
Mget dat*.zip
Mget dat*.tar
get update.ini
get delta.ini
bye
NEW - File created each time..
code:
sdat4124.zip
OLD - File copied over from NEW, if changed.
code:
sdat4124.zip
HTH,
- Kent