read folders using file transfer protocol
dear friend, i need to download all the folders from my ftp system. so i have tried the below code.
Code:
Dim wc As New Net.WebClient()
wc.Credentials = New Net.NetworkCredential("ganesh", "")
wc.DownloadFile("ftp://192.168.0.138/VAU002", "..\..\..\Local_Servers/VAU002")
MsgBox("file downloaded")
wc.Dispose()
so i have many folders and files inside the "VAU002" which is my another system. so i have one buton.if i click the button it has to download all the folders and files inside the "VAU002" folder. please show me some example code to do this please
Re: read folders using file transfer protocol
DownloadFile will download one file only, so you have to specify the full path to one file. To determine what files and folders are available you can use an FtpWebRequest and set its Method property to WebRequestMethods.Ftp.ListDirectories.
Re: read folders using file transfer protocol
dear jmcilhinney,
can u please provide some example link to achieve this please
Re: read folders using file transfer protocol
I'm quite sure that you're just as capable of searching MSDN and Google for the relevant terms as I am. I've never done it myself but if I was the first thing I would be doing is going to the MSDN Library and looking up FtpWebRequest and WebRequestmethods.Ftp.ListDirectories, as should anyone.
Re: read folders using file transfer protocol