Renames a file or directory stored on the FTP server.
WebAPI.bdh
WebFtpRenameFile( in hFtp : number, in sOldFilename : string, in sNewFilename : string ) : boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hFtp | Valid handle to an FTP session |
sOldFilename | String that contains the name of the file that will have its name changed on the remote FTP server |
sNewFilename | Null-terminated string that contains the new name for the remote file |
// Rename a file on the FTP server. dcltrans transaction TWebFtpDir var hFtp: number; begin WebFtpConnect(hFtp, "standardhost", WEB_PORT_FTP, "anonymous", "mymail@address.com"); WebFtpRenameFile(hFtp, "test_file.txt","renamed_test_file.txt"); WebFtpShutdown(hFtp); end TWebFtpDir;
Ftp.sep