4D Internet Commands v14FTP_Login |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Internet Commands v14
FTP_Login
|
FTP_Login ( hostName ; userName ; password ; ftp_ID ; welcomeText ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
hostName | String |
![]() |
Host name or IP address | |||||
userName | String |
![]() |
User name | |||||
password | String |
![]() |
Password | |||||
ftp_ID | Longint |
![]() |
Reference to this new FTP session | |||||
welcomeText | Text |
![]() |
FTP Welcome text | |||||
Function result | Integer |
![]() |
Error Code | |||||
The FTP_Login command establishes a connection with the FTP server at hostName and logs onto the system using the supplied userName and Password.
hostName is the host name or IP address of the remote system.
userName is the name of a user account recognized by the FTP server. Many FTP servers support guest access via an "anonymous" username. If you are logging in anonymously, it is customary to supply your e-mail address as the password.
password is the password for userName on the system.
ftp_ID is the long integer value obtained for the newly opened session. This value will be used in subsequent FTP commands. This parameter must be passed a 4D variable or field in order to accept the returned results.
welcomeText is an optional parameter which contains the text returned when the user logs into the system. Many FTP sites have a Welcome message displayed at the time of login. If specified, this parameter must be passed a 4D variable or field in order to accept the returned results.
$OK:=False
Case of
:(FTP_Login("ftp.4d.com";"anonymous";"dbody@aol.com";vFTP_ID;vFTP_Msg)#0)
:(FTP_Progress(-1;-1;"Progress window";"Getting requested file…";"*")#0)
:(FTP_Send(vFTP_ID;"My Hard Drive:Documents ƒ:July Sales Report";"/pub/reports";1)#0)
:(FTP_Logout(vFTP_ID)#0)
Else
$OK:=True `all commands executed without error
End case
Note: For more information about this particular use of the Case of structure, please refer to Appendix A, Programming Tips.
Product: 4D Internet Commands
Theme: IC File Transfer
Number:
88945
Created: 4D Internet Commands 6.5
4D Internet Commands ( 4D Internet Commands v11.4)
4D Internet Commands ( 4D v13.2)
4D Internet Commands ( 4D Internet Commands v12.1)
4D Internet Commands ( 4D Internet Commands v14 R2)
4D Internet Commands ( 4D Internet Commands v14)
4D Internet Commands ( 4D Internet Commands v14 R3)
4D Internet Commands ( 4D Internet Commands v14 R4)