473,385 Members | 1,766 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,385 software developers and data experts.

DownloadFile

I am trying to write a program to download files from the Internet, I know
using
webClient.Downloadfile(RemoteDir + remoteFileName, LocalFileName) can
download a singles file,
my question is, if we know a remote Dir, can we find all files in that dir?
(like Directory.Getfiles(Dir))
that way we can download all files in that directory.

Thank you very much.

Mike

Jul 21 '05 #1
4 1314
Cor
Hi Mike,

From the Pentagon?

For that is FTP.

But only for FTP sites of course.

I know it helps not much, but if you find it, there are more intrested in
that.

Cor
I am trying to write a program to download files from the Internet, I know
using
webClient.Downloadfile(RemoteDir + remoteFileName, LocalFileName) can
download a singles file,
my question is, if we know a remote Dir, can we find all files in that dir? (like Directory.Getfiles(Dir))
that way we can download all files in that directory.

Jul 21 '05 #2

"Mike Lincoln" <ml*********@hotmail.com> wrote in message
news:Oe**************@TK2MSFTNGP10.phx.gbl...
I am trying to write a program to download files from the Internet, I know
using
webClient.Downloadfile(RemoteDir + remoteFileName, LocalFileName) can
download a singles file,
my question is, if we know a remote Dir, can we find all files in that dir? (like Directory.Getfiles(Dir))
that way we can download all files in that directory.


It depends on which protocol you will use. What protocol are you planning to
use?
Jul 21 '05 #3
Thank you guys for replying.

I am using HTTP protocal.

For example, I want to download all pictures from http://localhost/Images/,
what should I do?
"Mike Lincoln" <ml*********@hotmail.com> wrote in message
news:Oe**************@TK2MSFTNGP10.phx.gbl...
I am trying to write a program to download files from the Internet, I know
using
webClient.Downloadfile(RemoteDir + remoteFileName, LocalFileName) can
download a singles file,
my question is, if we know a remote Dir, can we find all files in that dir? (like Directory.Getfiles(Dir))
that way we can download all files in that directory.

Thank you very much.

Mike

Jul 21 '05 #4
"Mike Lincoln" <ml*********@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP10.phx.gbl...
Thank you guys for replying.

I am using HTTP protocal.
You can use WebClient thats built into .net, or you can use Indy:
http://www.indyproject.org/indy.html

Indy support many more options than WebClient does.

And don't worry - its not commercial, its open source and free.
For example, I want to download all pictures from http://localhost/Images/, what should I do?


Well thats kind of a problem. SOME webservers will give you a directory
listing, some wont. If they do you have to go through the HTML and pluck out
the URLs and request for each one.
Jul 21 '05 #5

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

Similar topics

1
by: James Write | last post by:
Hi, I am using the webclient.downloadfile() method to download a file from a remote web server to the local harddrive. public CopyFile(string sSrcPath, string sDestPath) { WebClient oClient...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
1
by: Cheri Elkin | last post by:
I recieve the following error when attempting to download a file from our web server to be placed on our hard drive. Any clues as to why I would get this error? By the way, the directory already...
8
by: DEWright_CA | last post by:
Why does WebClient.DownloadFile loose my completed path? Ok, I have a function in my app then when my button is clicked it checks to see if the files come from a local drive or a http address....
2
by: cindy.fisher | last post by:
I am using DownloadFile() on a C# web app to download a file to a client. When I set the WebClient credentials to the DefaultCredentials, I get a 401 Unauthorized exception. WebClient myWC = new...
1
by: peter.rietmann | last post by:
I have been suddenly having a performance problem downloading images from one server (productive) to another (productive) using the following code .. WebClient webClient = new WebClient(); try...
3
by: IntraRELY | last post by:
I have a loop that loops through this sub. However, I recieve an WebException error in my try statement. "An exception occurred during a WebClient request." This message doesnt happen when I am...
6
by: Morten Snedker | last post by:
I have this Class: Imports System.Net Public Class DownloadFile Private _webClt As WebClient Private _url As String Private _file As String Sub New(ByVal urlSource As String, ByVal...
2
by: Lila Godel | last post by:
I am having a problem with the download of web pages via the WebClient.DownloadFile function in the specialized VB.Net 2003 I.E. plug-in I am designing to speed up the work on my latest project. ...
8
by: =?Utf-8?B?UnVpIE9saXZlaXJh?= | last post by:
WebClient.DownloadFile I am using the WebClient.DownloadFile function to download a file from server to a local client. When I execute the below code, file is created in server and not in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.