G
Guest
On the following page is for Symantec Antivirus updates:
http://www.sarc.com/avcenter/download/pages/US-SAVCE.html
Todays virus definition filename & path is:
http://definitions.symantec.com/defs/20050228-024-x86.exe
Notice the filename is: 20050228-024-x86.exe
I can get the '20050228-' & '-x86.exe', but there is no way of telling what
the 3 numbers will be. One day they could be 006 (like yesterday) & another
day they could be 024 (like today).
I have a download file routine which works fine if you pass it a 100%
perfect link, but if you don't it errors. Here's my test function:
Private Function CreateFilename(ByVal iRevision As Integer) As String
Dim strRevision As String = String.Format("{0:d3}", iRevision)
Dim strPath As String = "http://definitions.symantec.com/defs/"
Dim strFileEnding As String = "-x86.exe"
Dim strDate As String = Format(DateTime.Today, "yyyy/MM/dd-")
Return strPath & strDate & strRevision & strFileEnding
End Function
If I call this fuction 'CreateFilename(24)' then the link is correct, but
displays an Object not set for an instance of an object error.
If I say:
Dim AAA As String =
"http://definitions.symantec.com/defs/20050228-024-x86.exe" then there is no
error although the two are identical.
Anyway, I need a way to find the correct reference number. Example 024.
Do I download the html for the page & search for 'http' or 'x86' for example
& find it that way or do I create an array of filenames & try each one until
they work?
Any help would be grateful
http://www.sarc.com/avcenter/download/pages/US-SAVCE.html
Todays virus definition filename & path is:
http://definitions.symantec.com/defs/20050228-024-x86.exe
Notice the filename is: 20050228-024-x86.exe
I can get the '20050228-' & '-x86.exe', but there is no way of telling what
the 3 numbers will be. One day they could be 006 (like yesterday) & another
day they could be 024 (like today).
I have a download file routine which works fine if you pass it a 100%
perfect link, but if you don't it errors. Here's my test function:
Private Function CreateFilename(ByVal iRevision As Integer) As String
Dim strRevision As String = String.Format("{0:d3}", iRevision)
Dim strPath As String = "http://definitions.symantec.com/defs/"
Dim strFileEnding As String = "-x86.exe"
Dim strDate As String = Format(DateTime.Today, "yyyy/MM/dd-")
Return strPath & strDate & strRevision & strFileEnding
End Function
If I call this fuction 'CreateFilename(24)' then the link is correct, but
displays an Object not set for an instance of an object error.
If I say:
Dim AAA As String =
"http://definitions.symantec.com/defs/20050228-024-x86.exe" then there is no
error although the two are identical.
Anyway, I need a way to find the correct reference number. Example 024.
Do I download the html for the page & search for 'http' or 'x86' for example
& find it that way or do I create an array of filenames & try each one until
they work?
Any help would be grateful