4D Internet Commands v16

FTP_Send

Home

 
4D Internet Commands v16
FTP_Send

FTP_Send 


 

FTP_Send ( ftp_ID ; localPath ; hostPath ; progress ) -> Funktionsergebnis 
Parameter Typ   Beschreibung
ftp_ID  Lange Ganzzahl in Reference to a FTP login
localPath  Text in Pathname of document to send
hostPath  Text in Pathname to destination of document
progress  Ganzzahl in 1 = Show Progress, 0 = Hide Progress
Funktionsergebnis  Ganzzahl in Error Code

Given a reference to an open FTP session, the pathname of a document to send and the destination pathname, the FTP_Send command sends the document to the remote machine. FTP_Send will return immediately if a FTP file status error occurs.

ftp_ID is the long integer reference to the FTP session established with FTP_Login.

localPath is the path of the document to be sent. If localPath is a null string, the user will be presented with the Standard Open File dialog. If localPath is a file name with no path, the command will look in the folder that contains the database structure (with 4D single-user) or in the 4D Client folder (with 4D Server) for the file. As with all paths to local documents, the directories should be seperated by a delimiter appropriate for the platform. For more information, see the section entitled Glossary and Terminology at the beginning of the manual.

Note: FTP commands work with documents whose names have a limited length. For more information, refer to the File Transfer, Overview section).

hostPath is the path to the destination of the document, including the file name. The hostPath represents the desired name of the file once it has been received by the FTP server. If localPath is a null string allowing the user to pick a file from disk, then hostPath may also be a null string, in which case the chosen file's name will be used.

hostPath may be either a full pathname specification or simply a filename. If a full pathname is supplied, the specified file will be placed in the directory indicated by hostPath. If only a filename is provided, or null strings are used in the file selection, then the file will be sent to the Current Working Directory [CWD].

If the file or pathname cannot be resolved correctly, the command will return an error. If the user does not have enough privileges to send a file to that directory, an error will be returned. As with all paths to Unix documents, the path should be separated by slashes ("/"). For more information, see the section entitled Glossary and Terminology at the beginning of the manual.

Note: The FTP server may also impose specific limitations concerning the length or characters used for file names.

progress is an integer value indicating whether the Progress indicator should be displayed or not. A value of 1 will display the progress indicator. A value of zero will hide the progress indicator.

 $OK:=False
 Case of
    :(FTP_Login("ftp.4d.com";"anonymous";vEmailID;vFTP_ID;vFTP_Msg)#0)
    :(FTP_Progress(-1;-1;"Progress window";"Getting requested file…";"Cancel")#0)
    :(FTP_Send(vFTP_ID;"My Hard Drive:Documents:July Sales Report";"/pub/reports/July_sales";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.

 $error:=FTP_Send(vFTP_ID;"";"";1)



Siehe auch 

FTP_Progress
FTP_Receive

 
EIGENSCHAFTEN 

Produkt: 4D Internet Commands
Thema: IC File Transfer
Nummer: 88937

 
GESCHICHTE 

Erstellt: 4D Internet Commands 6.5

 
ARTIKELVERWENDUNG

4D Internet Commands ( 4D Internet Commands v16)