views:

184

answers:

1

Can anyone help me on how can I download file form another computer and save it to my computer..

+1  A: 

Not sure exactly what you want to download or where from, but I'm guessing that what you're looking for is to download something from a website to a local file and if so, look at WebClient.DownloadFile. See http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadfile%28VS.80%29.aspx for more info.

Otherwise, if you mean just copying files in the local network, then you can just use File.Copy. http://msdn.microsoft.com/en-us/library/system.io.file.copy.aspx

Btw, you might want to look at sorting out your accept rate if you want more people to look at and answer your questions.

ho1
Thanks you very much!! It works! :)
Mark
Follow up question:I have used your link for me to copy the files..The question is how can I choose the location where to save the files to be copy.. The code in the link is a hard coded link (where to copy the file)..My first idea is to use the OpenFileDialog tools to locate the folder path where to copy the files but I fail to do that..Any idea on how can I do it? Hoping for your feedback
Mark
Wrong way around, since you want a path for where to write the file, you should be using SaveFileDialog.
ho1
See http://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog.aspx
ho1
@Mark Just so you know - if this answer solved your problem, you should click on the big tick next to the answer. This "accepts" it as the solution and gives `ho1` some points. It's the polite thing to do around here.
MarkJ