Downloading files from URL address from within C# Windows Applicat

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
 
I

Ignacio Machin ( .NET/ C# MVP )

 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
 
M

Marc Gravell

using (WebClient client = new WebClient()) {
client.DownloadFile(url, dest);
}

Marc
 
I

Ignacio Machin ( .NET/ C# MVP )

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.
 
K

kimiraikkonen

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
 
T

Todd Jaspers

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...
 
T

Todd Jaspers

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
 
K

kimiraikkonen

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
 
T

Todd Jaspers

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
 
K

kimiraikkonen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top