Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How can I FTP from my VB program?

How can I FTP from my VB program?

FTP or File Transfer Protocol is a common way of moving
files around the internet. After HTTP (HyperText Transfer
Protocol) it might well be the next most common. Normally FTP
is performed by a stand-alone program. Microsoft Windows comes
with an FTP client program, as does Linux. In addition there
are many additional ftp clients available as well, typically
providing additional features and functionality. (In the
Windows arena, CuteFTP seems to be
particularly popular.)

Become a Patron of Ask Leo! and go ad-free!

If you want to have a program you’ve written transfer files for
via FTP then your options change. For quick and dirty solutions
including most batch files or scripts, simply spawning the
command line versions of existing FTP tools is a fairly
reasonable compromise. I’m particularly fond of ncftpget and
ncftpput that are available free from NcFTP Software for
this approach. (NcFTP also produces an ftp server package for
Unix, as well as a license-able cross-platform ftp library.)

If you’re looking for something a little more streamlined
then ChilKat FTP may be the solution,
particularly if you’re programming in Visual Basic. This free
ActiveX control plugs in to your VB application and provides a
robust and relatively easy to use interface. I recently started
using ChilKat FTP in one of my applications and have been
pleasantly surprised. (ChilKat also makes several other
interesting plug in components, though most are not free.)

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

32 comments on “How can I FTP from my VB program?”

  1. I want to get the FTP program that will search for a file in server and bring the file to local machine using VB 6.0
    Can you help me now???

  2. I started developing with Chilkat FTP. All works
    great in VB 6 with one exception. I cannot close
    a session. I have used every derivative of
    ChilkatFTP1.Disconnect() that I can think of and
    all to no avail. Can you tell me what the proper
    close statement and/or arguments should be ? I
    would greatly appreciate this little tidbit if
    you have yours up and running.


  3. Not sure what could be going on … it’s pretty simple from what I can see. Here’s the line of code that I have working:

    If (ftp.IsConnected) Then http://ftp.Disconnect

    You might check Err.Description after a failure to see if it has any clues.

  4. Hola
    I chanced acorss this article when looking to add FTP functionality to my VB computing project. I downloaded the chillcat activeX thing and read the documentation the website. Im ok at writing VB and i think ive figured out what i need to code to make it all work but ive never used an external activeX DLL before how do I plug the the component “in” to my project? I must seem like such a ‘tard, ne help apprecated. thanks

  5. I am looking for a FTP program in VB6 that can copy folders from a specified location in the Server to the client machine. Could somebody please help me with this problem

  6. my problem is that i need to find a way to run a vb program from an ftp site that will extract data from RAM on a seperate vm-1 microcontroller through an Ethernet connection

  7. I want to get the FTP program that will search for a file in server and bring the file to local machine using VB 6.0
    Can you help me now???
    and i want how to us in VB .

  8. This is ridiculous. The only solution offered here is a control you have to pay for now. And where the $%^@ is Leo?

  9. You don’t have to buy the Standard version of Chilkat FTP. I couldn’t find it on their site but a Google search turned it up quickly. I’m still coding wih it, but if it does everything it seems to I am impressed.

  10. I have multiple files in a specified FTP site.
    Please help me how can I upload the data in each file at ftp site to a file in hard disc one after the other using VB6.

  11. You can FTP the file by using .bat file in windows.
    And you can Run this .bat file in your VB program.
    I have tried and it is working fine.

    Dim aa
    aa = Shell(“D:\ftpfile.bat”, vbNormalFocus)

    shell function uses to call the .bat file.


Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.