Tech Tip: Error 10002 with FTP_GetDirList
PRODUCT: 4D Internet Commands | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: December 21, 2001
By
4D, Inc. Technical Support Engineer
Composed:
Compatibility: 6.5.x and 6.7.1
Platforms: Windows and Mac
If FTP_GetDirList is returning error 10002 (invalid array type), chances are you used a wrong array type for the listing type. Please note that it MUST be an Integer type array. Using a Longint array will trigger that error.
The following is a valid example of how to use that command:
ARRAY TEXT($names;1)
ARRAY LONGINT($sizes;1)
ARRAY INTEGER($kinds;1)
ARRAY DATE($modDates;1)
$err:=FTP_Login("ftp.4d.com";"anonymous";"hugo@4d.com";$vFTP_ID;$vFTP_Msg)
$err:=FTP_GetDirList ($vFTP_ID;$Dir;$names;$sizes;$kinds;$modDates)
$err:=FTP_Logout ($vFTP_ID)