Function Reference


_FTP_FindFileNext

Find Next File on an FTP server

#include <FTPEx.au3>
_FTP_FindFileNext ( $hFTPFind )

Parameters

$hFTPFind Handle as returned by _FTP_FindFileFirst().

Return Value

Success: an array:
[0] - Number of elements
[1] - File Attributes
[2] - Creation Time Low
[3] - Creation Time Hi
[4] - Access Time Low
[5] - Access Time Hi
[6] - Last Write Low
[7] - Last Write Hi
[8] - File Size High
[9] - File Size Low
[10] - File Name
[11] - Altername
Failure: 0 and sets the @error flag to non-zero.

Related

_FTP_FindFileClose, _FTP_FindFileFirst

See Also

Search InternetFindNextFile in MSDN Library.

Example

#include <FTPEx.au3>

Local $sServer = 'ftp.csx.cam.ac.uk'
Local $sUsername = ''
Local $sPass = ''

Local $hOpen = _FTP_Open('MyFTP Control')
Local $hConn = _FTP_Connect($hOpen, $sServer, $sUsername, $sPass)

Local $h_Handle
Local $aFile = _FTP_FindFileFirst($hConn, "/pub/software/programming/pcre/", $h_Handle)
ConsoleWrite('$sFileName = ' & $aFile[10] & ' attribute = ' & $aFile[1] & '  -> Error code: ' & @error & @CRLF)

$aFile = _FTP_FindFileNext($h_Handle)
ConsoleWrite('$sFilenameNext1 = ' & $aFile[10] & ' attribute = ' & $aFile[1] & '  -> Error code: ' & @error & @CRLF)

$aFile = _FTP_FindFileNext($h_Handle)
ConsoleWrite('$sFilenameNext2 = ' & $aFile[10] & ' attribute = ' & $aFile[1] & '  -> Error code: ' & @error & @CRLF)

$aFile = _FTP_FindFileNext($h_Handle)
ConsoleWrite('$sFilenameNext3 = ' & $aFile[10] & ' attribute = ' & $aFile[1] & '  -> Error code: ' & @error & @CRLF)

Local $iFindClose = _FTP_FindFileClose($h_Handle)

Local $iFtpc = _FTP_Close($hConn)
Local $iFtpo = _FTP_Close($hOpen)