I'm just kind of messing around with the FTP functionality in autoit, I did have it working once but the file was empty when it uploaded and now I am not getting any files uploaded what so ever.
#include <FTPEx.au3>
ftpTest("SERVER", "USERNAME", "PASSWORD")
Func ftpTest($server, $username, $password)
Local $open = _FTP_Open('FTP')
Local $session = _FTP_Connect($open, $server, $username, $password)
If $session == 0 Then
MsgBox(0, "Error connecting", "could not connect")
Else
Local $upload = _FTP_FilePut($session, "./test.txt", "./htdocs/")
MsgBox(0, "", "connected!")
EndIf
_FTP_Close($open)
If $upload == 1 Then
MsgBox(0, "FTP", "File Uploaded!")
ElseIf $upload == 0 Then
MsgBox(0, "Error", @ERROR)
EndIf
EndFunc
It's not an error connecting to the server, its an error with the _FTP_FilePut function and the error I am getting is "0" so its not a very descriptive error...