Ticket #2982: _FTP_Connect.au3

File _FTP_Connect.au3, 467 bytes (added by mLipok, 7 years ago)
Line 
1#include <FTPEx.au3>
2#include <MsgBoxConstants.au3>
3
4Local $sServer = 'ftp.csx.cam.ac.uk' ; UNIVERSITY OF CAMBRIDGE ANONYMOUS FTP SERVER
5Local $sUsername = ''
6Local $sPass = ''
7
8Local $hOpen = _FTP_Open('MyFTP Control')
9Local $hConn = _FTP_Connect($hOpen, $sServer, $sUsername, $sPass)
10If @error Then
11        MsgBox($MB_SYSTEMMODAL, '_FTP_Connect', 'ERRROR')
12Else
13        ; do something ...
14EndIf
15Local $iFtpc = _FTP_Close($hConn)
16Local $iFtpo = _FTP_Close($hOpen)