PC Review


Reply
Thread Tools Rate Thread

Downloading file without knowing the corrent filename

 
 
=?Utf-8?B?Q3JvdWNoaWUxOTk4?=
Guest
Posts: n/a
 
      1st Mar 2005
On the following page is for Symantec Antivirus updates:

http://www.sarc.com/avcenter/downloa.../US-SAVCE.html

Todays virus definition filename & path is:

http://definitions.symantec.com/defs...28-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
 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      1st Mar 2005
Crouchie,

I assume it is the daily build, however why don't you ask them that
yourself?

And when it is that build, it can be hard to get it with not only testing if
it exist using the http.request

Just my thought,

Cor


 
Reply With Quote
 
Chris Dunaway
Guest
Posts: n/a
 
      1st Mar 2005

> http://definitions.symantec.com/defs...28-024-x86.exe
>
> Notice the filename is: 20050228-024-x86.exe
>
> 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.
>


You say that the two are identical but they appear not to be. Your
format statement is formatting the date as yyyy/MM/dd- with slashes
but the filename does not have slashed in the date?

 
Reply With Quote
 
=?Utf-8?B?Q3JvdWNoaWUxOTk4?=
Guest
Posts: n/a
 
      1st Mar 2005
Yeah, sorry. That date shouldn't have had the '-' there. The amount of times
I've changed the function...

Anyway, when I use a variable for example to hole the filename:

Example:

Dim strFile As String = CreateFilename(24) ...

-----------------------------------------------------

I will build the program & then it will run around 11pm GMT. The filename
will be created at runtime & automatically download the file

 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      26th Mar 2010
Am 26.03.2010 15:47, schrieb arjun koirala:
> downloading file without knowing
>
> [...]


Congratulations! Answering the oldest post ever. You saw it's from 2005?

--
Armin
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ExecuteScalar don't return the corrent Int value. pedestrian Microsoft ADO .NET 2 26th Aug 2006 01:48 AM
IE 6 changes filename when downloading =?Utf-8?B?bWFycmFudA==?= Windows XP Internet Explorer 0 10th Dec 2005 06:43 PM
Filename problems when downloading Henke Microsoft ASP .NET 6 16th Nov 2004 06:18 PM
Wrong filename when downloading a file with a php script? Gosain Windows XP Internet Explorer 0 2nd Apr 2004 02:21 PM
saving file with new filename based on current filename Michael J. Malinsky Microsoft Excel Programming 5 18th Mar 2004 01:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:44 PM.