Jump to content
Sign in to follow this  
marcsusy

error en la función _FTP_FindFileFirst

Recommended Posts

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

 

 

Share this post


Link to post
Share on other sites

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 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.

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  

×
×
  • Create New...