Hello
I have problem with reading file from ftp. I used loop waiting for input, in this loop is function to process file from ftp. There is only one file at the same moment on ftp. First loop is success, for example file name 123.txt. In second loop is file name 456.txt, but script is trying to open and read 123.txt. Variable $ftpfiles[1] remain the same. Any advice is appreciated.
Thanks
I have problem with reading file from ftp. I used loop waiting for input, in this loop is function to process file from ftp. There is only one file at the same moment on ftp. First loop is success, for example file name 123.txt. In second loop is file name 456.txt, but script is trying to open and read 123.txt. Variable $ftpfiles[1] remain the same. Any advice is appreciated.
[ autoit ]
#include <FTPEx.au3> func _ftpread() Local $open = _FTP_Open("shipping") Local $connect = _FTP_Connect($open, $server, $ftplogin, $ftppswd) Local $ftpfiles = _FTP_ListToArray($connect, 2) Local $ftpfileopen = _FTP_FileOpen($connect,$ftpfiles[1]) Local $ftpfile = _FTP_FileRead($ftpfileopen,100000) Global $convertstring = BinaryToString($ftpfile) _FTP_FileClose($ftpfileopen) Local $ftpfiledelete = _FTP_FileDelete($connect,$ftpfiles[1]) _FTP_Close($open) EndFunc
Thanks