Is there a simple way to upload multiple files to FTP using code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LELE7
    New Member
    • Jan 2010
    • 14

    Is there a simple way to upload multiple files to FTP using code?

    I am trying to create a program that can upload many files at a time to an FTP site. I don't want to use a dialog box. I want to be able to specify a certain requirement in my code (for ex. all files that begin with "abc_"). I was able to find a lot of code online for uploading a single file, but all the code that I found for mulitiple files were either very lengthy or done by bringing in a new library.

    As you probably can tell, I'm relatively new to programming, so I'm trying to stay as simple as I can. Is it possible to do this in a simpler way?
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    If you know how to upload one file, then just loop through you list of files.

    Code:
    foreach (file Yogi in MyListOfFiles)
    {
         upload(Yogi);
    }
    (Sorry for the C#. But the concept is obvious and easy enough to put in VB.NET

    Comment

    Working...