The ftprename() call renames a file on a remote host.
Syntax
#include <ftpapi.h> int ftprename(host, userid, passwd, acct, namefrom, nameto) char *host; char *userid; char *passwd; char *acct; char *namefrom; char *nameto;
Parameters
host
To specify the port number (other than the well-know port) used by the FTP server, code the host name, followed by a blank, then the port number. For example, specify ftprename ("server1 1234",...)
Return Values
The value 0 indicates success; the value -1 indicates an error. The value of ftperrno indicates the specific error. See Return Values for a description of the return codes.
Examples
int rc;rc=ftprename("conypc","jason","ehgr1",NULL,"abc.1","cd.fg");
The file abc.1 is renamed to cd.fg on host conypc, using user ID jason, with password ehgr1.