Results 1 to 5 of 5

Thread: read folders using file transfer protocol

  1. #1

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    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
    Loving dotnet

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: read folders using file transfer protocol

    dear jmcilhinney,

    can u please provide some example link to achieve this please
    Loving dotnet

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: read folders using file transfer protocol

    ok friend i will try
    Loving dotnet

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width