Automatically FTP files with visual basic
Download source code from here.

Continued ....

The program is not difficult to set up and get to work but you do have to be careful when writing the batch text file to make sure that your entries are accurate.

Here are a few pointers which may help if you have problems :

  • If you are uploading to a server, make sure that the directory exists on the web server.
  • To represent the root directory use "/" so for example, /test is the directory test at the root of the server.
  • Check the log file called logfile.txt for any error messages. It should be in the same directory as the vbftp.exe.
  • Check the username/passwords are correct by trying to connect to the server with a different program.
  • The program needs the Microsoft Internet Transfer Control 6.0 (MSINET.OCX) and the Microsoft Access Object Library (MSACC9.OLB) on your PC for it to work. If they are not installed you will have to register them on your computer.

If all fails, you could email the logfile to me.

Some examples

The text file vbftp.txt contains a number of examples and explains the use of the commands.

Whenever you save the text file from the program a back up copy is made called vbftp.bak.