473,394 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Downloading files from URL address from within C# Windows Applicat

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
Jun 27 '08 #1
9 1227
On Jun 3, 9:18*am, Todd Jaspers
<ToddJasp...@discussions.microsoft.comwrote:
*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
Jun 27 '08 #2
using (WebClient client = new WebClient()) {
client.DownloadFile(url, dest);
}

Marc
Jun 27 '08 #3
On Jun 3, 9:39*am, "Ignacio Machin ( .NET/ C# MVP )"
<ignacio.mac...@gmail.comwrote:
On Jun 3, 9:18*am, Todd Jaspers

<ToddJasp...@discussions.microsoft.comwrote:
*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
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.
Jun 27 '08 #4
On Jun 3, 4:18 pm, Todd Jaspers
<ToddJasp...@discussions.microsoft.comwrote:
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
Jun 27 '08 #5
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.comwrote:
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
Jun 27 '08 #6
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
Jun 27 '08 #7
On Jun 3, 8:10*pm, Todd Jaspers
<ToddJasp...@discussions.microsoft.comwrote:
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.comwrote:
*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 internetwith
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
Jun 27 '08 #8
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" wrote:
On Jun 3, 8:10 pm, Todd Jaspers
<ToddJasp...@discussions.microsoft.comwrote:
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.comwrote:
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
Jun 27 '08 #9
On Jun 3, 8:51*pm, Todd Jaspers
<ToddJasp...@discussions.microsoft.comwrote:
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" wrote:
On Jun 3, 8:10 pm, Todd Jaspers
<ToddJasp...@discussions.microsoft.comwrote:
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 clearlyhas
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.comwrote:
*Hey guys,
* * * *I'm trying to consider my options. Does anyone hereknow 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 thisfile
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- Hide quoted text -

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

Onur
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Steve | last post by:
hello all im looking to make a download script as i cannot use the .htaccess to control directory access to files as im using a php login system using mysql and sessions. i have been playing...
1
by: Kajol | last post by:
Hi I am facing a strange problem in downloading files from the web. CASE 1: I have an ActiveX.dll file developed using Visual Basic 6.0 and uploaded on a Linux Server. I am typing...
36
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
4
by: Joe | last post by:
I'm hosting my web service on a Windows 2003 box which is remotely located. When trying to add a web reference to a C# project I get an error message 'There was an error downloading...
3
by: Paul Wilson | last post by:
Hi guys, I'm trying to enable downloading of a file from a website (my own website) from a windows application done in vb.net. Does anyone have a sample code for this (NOTE : I don't want to use...
4
by: aldonnelley | last post by:
Hi there: a bit of a left-field question, I think. I'm writing a program that analyses image files downloaded with a basic crawler, and it's slow, mainly because I only want to analyse files...
4
by: Mark | last post by:
I know that you can format url's withing an Access database but can you physically attach Word, Excel or pdf files within one? I need to attach backup documents into a database I am creating. Any...
8
by: danish | last post by:
Hi, Can anyone suggest me why some .php files are downloading and some are executing. Ive got php 5.2.0 and apache 2.0.54. Apache came as an rpm along with Fedora 4. I downloaded php from the site...
3
by: bfmcfarlane | last post by:
I have an appication that allows users to upload and download files. This application is only accessed when a user clicks on an "Upload / Download" link from within our main application. A new...
7
by: Ehsan | last post by:
I foundd this code in ASPN Python Cookbook for downloading files in python but when it finished downloading files the files became corrupted and didn't open, the files in internet havn't any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.