ftp_rendir_ex
| FTP Functions (ftp) |
Renames a file or directory on the FTP server for a specific session.
int ftp_rendir_ex( FTP *ppftp, char *transaction, <item list>, LAST );
Function objFTP.rendir_ex( ppftp as FTP, transaction as String, item_list as String, LAST ) as Integer
| ppftp | An FTP session identifier. |
| transaction | A transaction name for this step. To instruct VuGen not to create a transaction for this step, use a NULL string, "". |
| <item list> | A list of all the items for this function. Enclose all entries with quotes.SOURCE_DIR: The full path of the original file or directory name. TARGET_DIR: The full path of the new file or directory name.ENDITEM - Marks the end of the list. (no quotes) |
| LAST | A marker indicating the end of the argument list. |
The ftp_rendir_ex function renames a file or directory on the FTP server for the specified session.
This function is for use with multiple sessions. For global sessions, use the ftp_rendir function, which leaves out the session identifier.
Return Values
If this function succeeds, it returns LR_PASS. Otherwise, it returns LR_FAIL.
Parameterization
All string input arguments can be passed using standard parameterization.
Example
In the following example, the ftp_rendir_ex function renames a directory on the FTP server.
{
unsigned long *ftp_session=NULL;// Log on to server "mansfield". The user is "fanny" defined on the server. The password is "price"
ftp_logon_ex(&ftp_session,"FtpLogon", "URL=ftp://mansfield\\fanny:price@mansfield",LAST );
// Make a directory "Text/X"
ftp_mkdir_ex(&ftp_session,"FtpMakeDir",
"PATH=Test/X");
// Rename the directory "Text/Y"
ftp_rendir_ex(&ftp_session,"FtpRenDir",
"SOURCE_DIR=Test/X" , "TARGET_DIR=Test/Y", ENDITEM,
LAST );ftp_logout_ex(&ftp_session);
return 0;
}

