FVSDK_ERROR_CODE FVSDK_Rename(FVSDK_Session* pSession, LPCTSTR pszOldPathName, LPCTSTR pszNewPathName);
Renames a file or directory. This operation can move a file or directory from one location to another as well. This functionality is dependent on how the server implements the RNFR and RNTO commands.
pSession
A pointer to the FVSDK_Session that is to perform the operation.
pszOldPathName
The full path name to the existing file or directory to be renamed.
pszNewPathName
The full path name to the new file or directory.
FVSDK_YES if the rename was successful; FVSDK_NO if unsuccessful. Error codes can be found in FVSDK_ErrorCodes.h.
// rename the file
if (FVSDK_Rename(pSession, "/pub/file.txt", "/pub/file.backup.txt") != FVSDK_YES)
AfxMessageBox("Unable to rename the file.");
// or we can move the file
if (FVSDK_Rename(pSession, "/pub/file.txt", "/file.txt") != FVSDK_YES)
AfxMessageBox("Unable to move the file.");