Ask Leo! by Leo A. Notenboom

How can I FTP from my VB program?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » General Computing » Computer Programming

Summary: Visual Basic is a powerful and fairly easy to use programming language. You can use a VB program to transfer files using FTP with an add-in.

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.)

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.)

Article C1853 - October 24, 2003

Helpful? Get new articles weekly by email in my FREE newsletter!

Your Name:
Your Email:


Why Subscribe?

Recent Comments
31 Comments

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.

Posted by: Bhargavi at August 10, 2006 11:06 PM

Hi Leo,

Could you share with me on create VB 6 program that is able to FTP to the FTP server.

Thanks.

Best Regards,

Posted by: widya at August 10, 2006 11:59 PM

i am using vb6 i want a upload/download facilty in our program it can be posible

Posted by: Mahesh at August 14, 2006 4:32 AM

"This is ridiculous." - I agree!!!...
But the comments are helpful, thx Supachai. ;))

Posted by: leo the lion at January 23, 2007 5:44 PM

There's a free, open-source FTP component called edtFTPnet available at http://www.enterprisedt.com/products/edtftpnet/overview.html

There are also some commercial versions, which extend this component with things like GUI controls and encryption, but the free version is a fully functional FTP component.

Posted by: Hans Andersen at March 22, 2007 8:51 PM

Personal use. If it is Free.

Posted by: shital at December 12, 2007 4:39 AM

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.

Posted by: Gopinath at November 16, 2008 1:19 AM

hi ,
Can any one let me know , to create a VB script which ftp form my computer to another

Posted by: silpa at February 13, 2009 1:28 AM

One of the best Meupload file searchers and download centres is here http://megauploadfiles.com/
Find al the necessary information there!

Posted by: ula at February 25, 2009 2:04 PM

Easy.....

http://www.example-code.com/vbdotnet/ftp_upload.asp

Posted by: Sam at November 19, 2009 3:53 PM

Post a comment on "How can I FTP from my VB program?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

  • Read the article at the top of this page. If your comment shows you didn't, it'll be deleted and ignored.

  • Comment only on this article. Use the Google search box at the top of the page if you have a question about something else.

  • Don't include personal information in the comment. No email addresses. No phone numbers. No physical addresses.

  • Don't spam. Excessive links to unrelated sites within a comment or across multiple comments will cause all such comments to be removed.

  • Don't ask me to recover lost passwords or hacked accounts. I can't, and those comments will be deleted.

  • I can't respond to every comment. And I can't vouch for the accuracy of others who do.

Please wait. Your comment is being processed ...


Question? Ask Leo!