Main Page | Report this Page
.NET DotNet Forum Index  »  VB.NET Forum (Visual Basic .NET)  »  FileDate Associated with a File Downloaded via...
Page 1 of 1    

FileDate Associated with a File Downloaded via...

Author Message
eBob.com...
Posted: Wed Oct 28, 2009 4:49 pm
Guest
I would like to get the date (created or lastmodified, I'm not fussy)
associated with a file which I download via a WebRequest.

My URL is http://path.jpg. I create the WebRequest by
wrq=WebRequest.Create(URL). I found that WebRequest has a Headers property
but I am not sure if that is the place to look. I did manage to find
"headers" for Host and something else (maybe Connection), but no Date. And
also, when I tried to dive deeper than Headers (in the documentation) I got
lost.

I don't know much about the server which I am getting the file from, but I
doubt that I can use FTP.

So ... getting a file via WebRequest, can I get a date associated with the
file? And, if so, where do I find some documentation on how to find it?

Thanks, Bob
 
eBob.com...
Posted: Wed Oct 28, 2009 6:07 pm
Guest
I haven't tried it yet but I think I have found what I am looking for:
HttpWebResponse.LastModified.

Bob


"eBob.com" <eBob.com at (no spam) totallybogus.com> wrote in message
news:ufejxDCWKHA.3428 at (no spam) TK2MSFTNGP06.phx.gbl...
Quote:
I would like to get the date (created or lastmodified, I'm not fussy)
associated with a file which I download via a WebRequest.

My URL is http://path.jpg. I create the WebRequest by
wrq=WebRequest.Create(URL). I found that WebRequest has a Headers
property but I am not sure if that is the place to look. I did manage to
find "headers" for Host and something else (maybe Connection), but no
Date. And also, when I tried to dive deeper than Headers (in the
documentation) I got lost.

I don't know much about the server which I am getting the file from, but I
doubt that I can use FTP.

So ... getting a file via WebRequest, can I get a date associated with the
file? And, if so, where do I find some documentation on how to find it?

Thanks, Bob

 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Mon Nov 23, 2009 12:51 pm