Example: ftp_dir_exFTP Vuser Functions (FTP)

Runs the dir command on the FTP server for a specific session.

int ftp_dir_ex( FTP *ppftp, char *transaction, <item list>, LAST );

Function objFTP.dir_ex( ppftp as FTP, transaction as String, item list as String, LAST ) as Integer         ` for VB Script

ppftpAn FTP session identifier.
transactionA transaction name for this step. To instruct VuGen not to create a transaction for this step, use a NULL string, "".
item_listA list of all the items for this function. Enclose all entries with quotes.
PATH - The full path of the location at which to run the dir command.
OUTPUT (optional) - The path and file name for writing the results of the dir. If this option is not specified, the dir results are saved to the Vuser log file when the Extended log > Data returned by server option is enabled in the Runtime settings.
PASSIVE (optional) - Sets the communication protocol to Passive Mode FTP. To enable, pass "PASSIVE=TRUE".
ENDITEM - Marks the end of the list. (no quotes)
KINDThe command to run. For example, "KIND=MLSD"
LAST A marker indicating the end of the argument list.

The ftp_dir_ex function runs the dir command on the FTP server for the specified session.

This function is for use with multiple sessions. For global sessions, use the ftp_dir function, which leaves out the session identifier.

Return Values

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