Re: How do I copy a file from the Internet
Eddie Lascu <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Organization | IBI Group |
| Message-ID | <[email protected]> |
Thank you John. At this time all I want is to be able to keep a copy of the XML file, just in case the parsing phase doesn't go right. What code Stuart gave me works fine. Thanks to both of you, Eddie -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[email protected]] On Behalf Of John Warner Sent: Monday, November 17, 2008 12:32 PM To: [email protected] Subject: Re: [ADVANCED-DOTNET] How do I copy a file from the Internet If you need a stream, use Stream strm = Client.OpenRead(uri) John Warner -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[email protected]] On Behalf Of Stuart Dunkeld Sent: Monday, November 17, 2008 12:26 PM To: [email protected] Subject: Re: [ADVANCED-DOTNET] How do I copy a file from the Internet \this should do it: System.Net.WebClient client = new WebClient(); client.DownloadFile(Uri, filename); --stuart On Mon, Nov 17, 2008 at 5:16 PM, Eddie Lascu <[email protected]> wrote: > I am investigating this (should be simple, I guess) but if anyone > knows a shortcut, perhaps wouldn't mind sharing it. > I need to save a local copy of a file that is located on the Internet, > at a fix URI: http://.... File.Copy doesn't work, saying that it > cannot support URIs. > > TIA, > Eddie > > =================================== > View archives and manage your subscription(s) at > http://peach.ease.lsoft.com/archives > =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives