Open topic with navigation
|Example: ftp_put||FTP Vuser Functions (FTP)|
Uploads a file to the FTP server.
int ftp_put( char *transaction, <item list> LAST );
Function objFTP.put( transaction as String, item_list as String, LAST ) as Integer `for VB , VB Script
|transaction||A transaction name for this step. To instruct VuGen not to create a transaction for this step, use a NULL string, "".|
A list of all the items for this function. Enclose all entries with quotes. Specify either SOURCE_PATH or MSOURCE_PATH.
SOURCE_PATH - The file to upload to the FTP server.
MSOURCE_PATH - The files to upload to the FTP server, using wildcards to specify multiple files. If wildcards are not specified, all the files in the MSOURCE_PATH are uploaded. Wildcard behavior is determined by the FTP server software. If the argument contains wildcards, make sure you test your script on each FTP version you are going to run tests on.
TARGET_PATH - (optional) The path and filename in which to place the file. if (M)SOURCE_PATH is specified, but TARGET_PATH is not specified, the file is stored in the root directory of the FTP server, with the original file name.
MODE - (optional) Retrieval mode ASCII or BINARY (default).
PASSIVE - (optional) Sets the communication protocol to Passive Mode FTP. To enable, pass "PASSIVE=TRUE".
ENDITEM - Marks the end of the item list. (no quotes)
|LAST||A marker indicating the end of the argument list.|
The ftp_put function uploads a file to the FTP server.
If the source prefix is "ftpfile_", during test run, the file is searched for under the data\ftp.db directory under the script directory. If not found, the data directory and then the script directory are searched.
This function is for use with global sessions. For multiple sessions, use the ftp_put_ex function, which allows you to specify a session identifier.
If this function succeeds, it returns LR_PASS. Otherwise, it returns LR_FAIL.
The following argument(s) can be parameterized with standard parameterization: List of Attributes