Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi,
I am making a batch file which will download two virus definition files from symantec's website and will download both the files but the problem is I don't know how to tell the batch file that download these files only as file names gets changed daily according to date in YYYYMMDD format. you can have a look at the webpage
hxxp://definitions.symantec.com/defs/ya I need to download -x86.exe file and .xdb file daily.
Kindly guide me further.
thanksK2™
System/Network Engineer

hi K2,
Based on your date format, use string
manupulation functions to form the filename.
Ex: In my machine,c:\holla>echo %date% 13-01-2009 c:\holla>echo %date:~-4% 2009 c:\holla>echo %date:~,2% 13 c:\holla>echo %date:~3,2% 01 c:\holla>ver Microsoft Windows [Version 6.0.6001] c:\holla>
Use the above to form the file name. And then use wget to get the file from hxxp://definitions.symantec.com/defs/............ Trust you get the idea.
--
Holla.

Didn't we go through this a couple months ago?
BTW, this is not a useable link on this site:
hxxp://definitions.symantec.com/defs/
Rather than mickey-mouse the date, what you probably need is the latest x86.exe & .xdb.
[Why would you want an out of date file?]
=====================================
If at first you don't succeed, you're about average.M2

mechanix i do always need latest updates, i daily needs those files, but daily i always have to download those files and have to update it onto 17 different servers which is very time consuming task so I want to make it totally automated by batch file which will daily download the latest updates files and will apply those downloaded file onto the servers. but I tried the wget and url2file utilities as they are not working at all.
K2™
System/Network Engineer

This should get you the latest x86.
=========================================
@echo off & setLocal EnableDelayedExpansion> #.ftp echo o ftp.symantec.com
>> #.ftp echo anonymous
>> #.ftp echo password
>> #.ftp echo bin
>> #.ftp echo cd AVDEFS
>> #.ftp echo cd norton_antivirus
>> #.ftp echo ls
>> #.ftp echo byeftp -s:#.ftp > symlist
for /f "tokens=* delims= " %%a in ('find /i "x86" ^< symlist ^| sort') do (
set NEWEXE=%%a
)set NEWEXE=!NEWEXE:~0,-1!
> #.ftp echo o ftp.symantec.com
>> #.ftp echo anonymous
>> #.ftp echo password
>> #.ftp echo bin
>> #.ftp echo cd AVDEFS
>> #.ftp echo cd norton_antivirus
>> #.ftp echo get !NEWEXE!
>> #.ftp echo byeftp -s:#.ftp
=====================================
If at first you don't succeed, you're about average.M2

![]() |
stuck in DOS
|
batch wait n secs for use...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |