查找 FTP 服务器上的下一个文件.
#Include <FTPEx.au3>
_FTP_FindFileNext($h_Handle)
$h_Handle | 由 _FTP_FindFileFirst() 返回的句柄. |
成功: | 返回一个数组, 参考备注. |
失败: | 返回 0 并设置 @ERROR |
在MSDN中搜索
#include <FTPEx.au3>
Local $server = 'ftp.csx.cam.ac.uk'
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/software/programming/pcre/", $h_Handle)
ConsoleWrite('$Filename = ' & $aFile[10] & ' attribute = ' & $aFile[1] & ' -> Error code: ' & @error & @CRLF)
$aFile = _FTP_FindFileNext($h_Handle)
ConsoleWrite('$FilenameNext1 = ' & $aFile[10] & ' attribute = ' & $aFile[1] & ' -> Error code: ' & @error & @CRLF)
$aFile = _FTP_FindFileNext($h_Handle)
ConsoleWrite('$FilenameNext2 = ' & $aFile[10] & ' attribute = ' & $aFile[1] & ' -> Error code: ' & @error & @CRLF)
$aFile = _FTP_FindFileNext($h_Handle)
ConsoleWrite('$FilenameNext3 = ' & $aFile[10] & ' attribute = ' & $aFile[1] & ' -> Error code: ' & @error & @CRLF)
Local $FindClose = _FTP_FindFileClose($h_Handle)
Local $Ftpc = _FTP_Close($Open)