marcsusy Posted June 20, 2013 Share Posted June 20, 2013 Please, I need help:_FTP_FindFileFirst I use the function in the following script and I get the following error: In my home computer working properly, I tried on another computer and I get this error Variable Array has incorrect number of subscripts or subscript dimension range exceeded.: script used #include <FTPEx.au3> Local $server = 'ftp.adobe.com' Local $username = '' Local $pass = '' Local $Open = _FTP_Open('MyFTP Control') Local $Conn = _FTP_Connect($Open, $server, $username, $pass) Local $h_Handle Local $aFile = _FTP_FindFileFirst($Conn, "/pub/adobe/reader/win/11.x/11.0.03/es_ES/", $h_Handle) ConsoleWrite('$Filename = ' & $aFile[10] & ' attribute = ' & $aFile[1] & ' -> Error code: ' & @error & @CRLF) Local $FindClose = _FTP_FindFileClose($h_Handle) Local $Ftpc = _FTP_Close($Open) Thank you Link to comment Share on other sites More sharing options...
abberration Posted June 20, 2013 Share Posted June 20, 2013 It appears that the computer that is giving an error is not retrieving correct information. Use the following line to compare what BOTH computers are retrieving. _ArrayDisplay($aFile) Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
jdelaney Posted June 21, 2013 Share Posted June 21, 2013 (edited) Local $aFile = _FTP_FindFileFirst($Conn, "/pub/adobe/reader/win/11.x/11.0.03/es_ES/", $h_Handle) If @error Then ConsoleWrite("There are no files in this directory; error=[" & @error & "]" & @CRLF) Else ConsoleWrite('$Filename = ' & $aFile[10] & ' attribute = ' & $aFile[1] & @CRLF) EndIf or Local $aFile = _FTP_FindFileFirst($Conn, "/pub/adobe/reader/win/11.x/11.0.03/es_ES/", $h_Handle) If IsArray($aFile) Then ConsoleWrite('$Filename = ' & $aFile[10] & ' attribute = ' & $aFile[1] & @CRLF) Else ConsoleWrite("There are no files in this directory; error=[" & @error & "]" & @CRLF) EndIf Edited June 21, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now