Helping people with computers... one answer at a time.

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 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

32 Comments
Koushik
April 18, 2004 8:47 PM

I'm looking for FTP Program in VB.

daitt
July 20, 2004 1:03 AM

I want to get the FTP program using VB 6.0
Can you help me now???

daitt
July 20, 2004 1:07 AM

I just read the information at the top of the page

saikat
September 29, 2004 5:17 AM

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???

anish
October 30, 2004 11:20 AM

I want the sourcecode of file transfering in VB

Mike K
March 22, 2005 1:54 PM

DO you have an idea why I my client can not upload a file using FTP of a form created using VB 6?

Thanks

Mike k
March 22, 2005 2:00 PM

your article was great.

Good luck

Mike

Mantu
April 5, 2005 5:28 PM

How can i send and get a file to a specified ip address
how can i check active ip s on internet

Bill
August 15, 2005 1:12 PM

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.

Thanks

Leo
August 17, 2005 8:41 AM

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 ftp.Disconnect

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

sree
January 29, 2006 10:46 PM

can anybody tell the steps for transfering files on ftp ?

Dev
February 12, 2006 7:41 PM

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

Mathew
March 28, 2006 4:51 AM

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

Jim O'Brien
April 19, 2006 3:47 AM

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

tom
April 28, 2006 6:29 AM

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 .

premkumar
May 2, 2006 12:25 AM

Sir, ram ic problem,slot problem,control problem to find out and sloving the problem used to program link with hardware.

gizelle
May 8, 2006 7:05 AM

how can i transfer a file to another pc using VB 6?..pls reply..i really need this badly..please.tnx..

Vyl
May 9, 2006 6:56 AM

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

Supachai
June 14, 2006 11:47 PM

Use winsock to connect to the party and formulate FTP message, then followed by file's content(can be in binary or text) that's it!

daulat
July 27, 2006 3:11 AM

How can i download file on time interval from server without downloading redundant data from same file using vb6

Chris
August 9, 2006 10:13 AM

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.

Bhargavi
August 10, 2006 11:06 PM

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.

widya
August 10, 2006 11:59 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,

Mahesh
August 14, 2006 4:32 AM

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

leo the lion
January 23, 2007 5:44 PM

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

Hans Andersen
March 22, 2007 8:51 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.

shital
December 12, 2007 4:39 AM

Personal use. If it is Free.

Gopinath
November 16, 2008 1:19 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.

silpa
February 13, 2009 1:28 AM

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

ula
February 25, 2009 2:04 PM

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

Sam
November 19, 2009 3:53 PM

Easy.....

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

Crystal Jefferson
January 13, 2010 9:10 AM

i am looking for a replacement for FTP client for VB6. using Socket tools 2.15.

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to http://askleo.com/ask to ask your question.