Jump to content
Sign in to follow this  

_FTPEx.udf (from the beta) dramas - strange behaviour

Recommended Posts


Hi All..

This is getting really frustrating - obviously something simple I'm overlooking.

I have a script I use on my win7 machine. But but I'm having such dramas on XP or vista machines. I've tracked the problem down to _FTP_FileListToArrayEx() (but I've found other functions in the _FtpEx.udf (I installed the beta version so I could use this udf) which behave similarly). When on Vista or XP, this script works fine with SOME ftp servers, but not others.

the following code works fine in XP, Vista, and win7, but if I change the ftp server details to my drivehq account, it ONLY works in win7, not in XP or Vista.. wierd right?

#include "FTPEx.au3"
$server = 'ftp.csx.cam.ac.uk'
$username = ''
$pass = ''
$Open = _FTP_Open('MyFTP Control')
$connection = _FTP_Connect($Open, $server, $username, $pass)
ConsoleWrite("connected" & @CRLF)
Local $directory = _FTP_DirGetCurrent($connection)

ConsoleWrite(@CRLF & "Dir: " & $directory)
If _FTP_DirSetCurrent($connection, "/etc") = 0 Then ConsoleWrite(@CRLF & "dirset error")
$directory = _FTP_DirGetCurrent($connection)
ConsoleWrite(@CRLF & "Dir: " & $directory)

$filelist = _FTP_ListToArrayEx($connection)
If IsArray($filelist) Then
    For $i = 1 to $filelist[0][0]
        ConsoleWrite(@CRLF & "[" & $filelist[$i][0] & "][" & $filelist[$i][1] & "][" & $filelist[$i][2] & "][" & $filelist[$i][3] & "]")
    ConsoleWrite(@CRLF & "[" & $filelist & "]" & @CRLF)


Gives this console output:


Dir: /
Dir: /etc
[hosts][702][128][2007/27/04 00:00:00]
+>20:50:56 AutoIT3.exe ended.rc:0
+>20:50:57 AutoIt3Wrapper Finished
>Exit code: 0    Time: 7.014

So that works fine... but when used with my drivehq account I get:


Dir: /
Dir: /etc
+>20:53:41 AutoIT3.exe ended.rc:0
+>20:53:42 AutoIt3Wrapper Finished
>Exit code: 0    Time: 26.697

the [0] indicates the ListToArrayEx encountered an error..

so to recap:

  • I'm using the dirchange functions in that code to verify that I've actually got a connection
  • the script works fine with all ftp servers including drivehq in win7
  • in vista / xp this script does work with the ftp site listed, however it DOESNT work with my drivehq account.
  • I am using alt-f5 to compile this script.
(So if you just test the script above and tell me "works fine here" thats not going to be very helpful...)

Any ideas what this problem might be? (And thanks for reading this huge post.. and thanks in advance for any guidance!)

Edited by Mr5o1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this