Downloading files from URL address from within C# Windows Applicat

  • Thread starter Thread starter Todd Jaspers
  • Start date Start date
T

Todd Jaspers

Hey guys,

I'm trying to consider my options. Does anyone here know of a way
that I can basically download or copy locally a file from the internet with
having nothing more than the URL? Basically, lets say there is a PDF file at
http://www.somewebsite.com/thefile.pdf, is there any way possible for me
(without the interaction of a user), to download and retrieve this file
locally?


Thanks guys!!!

Todd
 
 Hey guys,

       I'm trying to consider my options. Does anyone here know ofa way
that I can basically download or copy locally a file from the internet with
having nothing more than the URL? Basically, lets say there is a PDF file athttp://www.somewebsite.com/thefile.pdf, is there any way possible for me
(without the interaction of a user), to download and retrieve this file
locally?

Thanks guys!!!

Todd

Hi,

Yesterday was a post about this (with code included), take a look into
the archives
 
using (WebClient client = new WebClient()) {
client.DownloadFile(url, dest);
}

Marc
 
Hi,

Yesterday was a post about this (with code included), take a look into
the archives

This is the code from yesteday

HttpWebRequest request =
(HttpWebRequest)WebRequest.Create("http://
est.rbma.com/content/Hagar_The_Horrible?date=20080530");

request.GetResponse().GetResponseStream();

now you have your stream, you can do with it what you want.
 
Hey guys,

I'm trying to consider my options. Does anyone here know of a way
that I can basically download or copy locally a file from the internet with
having nothing more than the URL? Basically, lets say there is a PDF file athttp://www.somewebsite.com/thefile.pdf, is there any way possible for me
(without the interaction of a user), to download and retrieve this file
locally?

Thanks guys!!!

Todd

Hi,
Just use WebClient's DownloadFile method.

Hope this helps,

Onur Güzel
 
Dude! Kimi Raikonen is awesome!!! I was sooo happy to see him with the
championship last year. He is clearly a better driver than anyone else in
Formula-1. He had some issues in the beginning of the season with drinking
and partying too much with the ladies before each race, but he clearly has
more skill. Sucks about Monaco this year, but I just know he's going to do
awesome again this season.

Seems to be a trend with Finnish drivers... Mikka Hakkonen, Nikolai
Makkinen, Heiki Kovalainen, etc... a lot of "nen"s...
 
Thanks guys, I appreciate it. I double posted. I posted on here as well as
the forums (probably shouldn't). I do appreciate all the help. Marc helped me
out in the C# Forums.


Thanks!

Todd
 
Dude! Kimi Raikonen is awesome!!! I was sooo happy to see him with the
championship last year.  He is clearly a better driver than anyone else in
Formula-1. He had some issues in the beginning of the season with drinking
and partying too much with the ladies before each race, but he clearly has
more skill. Sucks about Monaco this year, but I just know he's going to do
awesome again this season.

Seems to be a trend with Finnish drivers... Mikka Hakkonen, Nikolai
Makkinen, Heiki Kovalainen, etc... a lot of "nen"s...








- Show quoted text -

LOL. I support him, too. He had so many unlucky races until he drives
for Ferrari plus last race Monaco, unlucky accident with Sutil... and
however i don't think or i don't know if there's Nikolai Makkinen.

Thanks for your thoughts :)


Onur
 
Nikolai Makinen was a really good rally driver back in the late 60s / early
70s. I may have his first name a bit wrong, but I know his last name is
correct. I think there's a newer Makinen in Rally presently, but I don't know
if they're related.


Todd
 
Nikolai Makinen was a really good rally driver back in the late 60s / early
70s. I may have his first name a bit wrong, but I know his last name is
correct. I think there's a newer Makinen in Rally presently, but I don't know
if they're related.

Todd








- Show quoted text -

You probably meant Timo Makinen for 70s and his successor Tommi
Makinen who is retired in 2003. :)

Onur
 
Back
Top