Folder upload in FTP

Posted on 2011-10-10
Last Modified: 2012-05-12
Hi, I am uploading files successfully to FTP  using Asp.Net 'File Upload Control' . Now i stuck how to Upload Folders to FTP. While Uploading Folders to FTP , If that folder contains sub-folders these sub-folders will display in server table structure. And one more doubt ,how to select folders using 'File Upload Control' . If not Possible to select Folders using 'File Upload Control' how to select them? Is their any control to select ? Is it Possible to Upload Folder in C#.Net ?.Is their  Any Better way to upload folders  other than Please send Related links or Code . Thanks in Advance.
Question by:CPSRI
    LVL 3

    Expert Comment

    Try scanning the directory with System.IO.Directory.GetFiles() and System.IO.Directory.GetDirectories() then you can use ftp to upload the files one by one with iteration.

    Author Comment

    hai karl-henrik,
               how will i choose folder..? using File upload control it selecting only files . how can i select folder.
    LVL 3

    Expert Comment

    It's not possible to use the File upload control for that but you can create your own.. have a look at this example it's quite small and I think it is spot on to solve your problem.

    Hope it helps
    LVL 3

    Accepted Solution

    Err this example How to browse for folders

    Author Closing Comment


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Deselect Grid view Row 4 28
    Javascript and mvc 12 36 c# execute .bat server side problem 6 46
    Javascript - getdate 5 36
    Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now