This post is out-dated and is only available for posterity.

My FTP UDF for AutoIt is very outdated, the newest versions of AutoIt have a FTP UDF built-in, it’s fully functional and very reliable. To see a list of commands and examples checkout the AutoIt help file.

I wanted to streamline an AutoIt scripts ftp functions and i knew an AutoIT UDF had been in the making, when i looked into it, it seemed as if the original creator had stopped updating the UDF and the thread consisted of scattered and out dated code. This is my attempt to combine the bits of code i found and also add a few updates of my own.

Here is a list of available functions:

  • _FTPOpen
  • _FTPConnect
  • _FTPPutFile
  • _FTPPutFolderContents
  • _FTPGetFile
  • _FTPDelFile
  • _FTPRenameFile
  • _FTPMakeDir
  • _FTPDelDir
  • _FTPGetFileSize
  • _FTPGetCurrentDir
  • _FTPSetCurrentDir
  • _FPTFindFileFirst
  • _FTPFindFileNext
  • _FTPFindFileClose
  • _FTPGetFoldercontents
  • _FTPClose

One last update that I’ve made is that you no longer need to use DLLOpen() before calling these functions, also all DLLCall functions now use the handle from DLLOpen, but you can still make more then one session if you wanted to.

Give me feedback if you would like to see anything changed or added

  • Updated (8-16-08): All handles are passed in an array, i did this because when i added the _FTPFindFile* commands everything seemed overly complicated and this made it very simple. Also a good example is now included
  • Updated (8-18-08): Fixed A Few Errors and took out some of my old code and added _ftpfilefindclose to the example along with some comments
  • Updated (9-10-08): Many tweaks and such, added _FTPGetFoldercontents, it doesn’t use true recursion but it will download sub directories and has a switch to specify not to

http://www.autoitscript.com/forum/index.php?showtopic=78378

FTP-2009-01-10