|
|
|
|
|
- Reminder about the FTP protocol
- FTP commands
- Example: Getting a TEST file located in the AAA library of an AS/400:
- Use conditions
- Required permissions
FTPCommand (Function) In french: FTPCommande Sends a specific FTP command to a server. Caution: This function is not available in the following connection modes:- FTPIS: FTP secured using SSL with implicit encryption.
- FTPES: FTP secured using SSL with explicit encryption.
- SFTP: FTP secured using an SSH tunnel.
New in SaaSA new syntax for manipulating variables of type ftpConnection is available from WINDEV Suite SaaS 2025 - Update 2. New in SaaSRemarks Reminder about the FTP protocol This protocol uses 2 communication channels: - A command channel, which allows sending commands and receiving error or success messages.
- A data channel, which is used to transmit the data associated with the command.
FTP commands All the commands that can be used on an FTP server are found in the RFC989 specification. This document is available on the Internet (simply search for the RFC989 reference). Common example: Uploading and downloading files with FTPCommand 1. Downloading files: Response, ResData are strings FTPCommand(<Connection identifier>, ... "RETR" + <Name file server>, ... Response, ResData, <Transfer mode>) // ResData contains the file 2. Uploading files: Response, ResData, DataResult are strings // ResData contains the file to upload FTPCommand(<Connection identifier>,... "STOR " + <Name File server>, ... Response, DataResult, <Transfer mode>, ResData) Example: Getting a TEST file located in the AAA library of an AS/400: Response, ResData are strings
FTPID = FTPConnect("as400", "login", "PWD")
FTPCommand(FTPID,"RETR " + "AAA/TEST", Response, ResData)
fSaveText("C:\Tmp\test", ResData)
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|