TScSFTPClient rename flags not working
Posted: Fri 24 Jun 2022 10:36
Hi, I'm using the TScSFTPClient component with C++ Builder. The rename operation fails if the target file already exists even if I pass the rfOverwrite flag. My code is below, am I missing something? Thx.
Code: Select all
if (!ScSFTPClient->Active)
ScSFTPClient->Initialize();
TScSFTPRenameFlags flags;
if (overwrite)
flags << rfOverwrite;
else
flags >> rfOverwrite;
ScSFTPClient->RenameFile(src_path, dst_path, flags);