Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Downloading files from URL address from within C# Windows Applicat

0 views
Skip to first unread message

Todd Jaspers

unread,
Jun 3, 2008, 9:18:00 AM6/3/08
to
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

Ignacio Machin ( .NET/ C# MVP )

unread,
Jun 3, 2008, 9:39:22 AM6/3/08
to
On Jun 3, 9:18 am, Todd Jaspers

<ToddJasp...@discussions.microsoft.com> wrote:
>  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,

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

Marc Gravell

unread,
Jun 3, 2008, 9:45:35 AM6/3/08
to
using (WebClient client = new WebClient()) {
client.DownloadFile(url, dest);
}

Marc

Ignacio Machin ( .NET/ C# MVP )

unread,
Jun 3, 2008, 10:02:41 AM6/3/08
to
On Jun 3, 9:39 am, "Ignacio Machin ( .NET/ C# MVP )"

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.

kimiraikkonen

unread,
Jun 3, 2008, 10:54:24 AM6/3/08
to
On Jun 3, 4:18 pm, Todd Jaspers

<ToddJasp...@discussions.microsoft.com> wrote:
> 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

Todd Jaspers

unread,
Jun 3, 2008, 1:10:00 PM6/3/08
to
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...

Todd Jaspers

unread,
Jun 3, 2008, 1:11:00 PM6/3/08
to
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

kimiraikkonen

unread,
Jun 3, 2008, 1:26:04 PM6/3/08
to
On Jun 3, 8:10 pm, Todd Jaspers

<ToddJasp...@discussions.microsoft.com> wrote:
> 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...
>
>
>
> "kimiraikkonen" wrote:
> > On Jun 3, 4:18 pm, Todd Jaspers
> > <ToddJasp...@discussions.microsoft.com> wrote:
> > >  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- Hide quoted text -
>
> - 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

Todd Jaspers

unread,
Jun 3, 2008, 1:51:04 PM6/3/08
to
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

kimiraikkonen

unread,
Jun 3, 2008, 2:11:49 PM6/3/08
to
On Jun 3, 8:51 pm, Todd Jaspers
> > Onur- Hide quoted text -

>
> - Show quoted text -

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

Onur

0 new messages