search for a file in website n dnld

January 12, 2009 at 19:48:00
Specs: Windows 2000 Server, 8 GHZ
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.
thanks

K2™
System/Network Engineer


See More: search for a file in website n dnld

Report •


#1
January 12, 2009 at 20:19:11
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.


Report •

#2
January 13, 2009 at 04:02:29
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


Report •

#3
January 13, 2009 at 04:42:02
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


Report •

Related Solutions

#4
January 14, 2009 at 08:07:56
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 bye

ftp -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 bye

ftp -s:#.ftp


=====================================
If at first you don't succeed, you're about average.

M2


Report •


Ask Question