Page 1 of 1

can't move unless filename is different

Posted: Fri 20 Dec 2013 15:51
by dcornelius
Using ScSFTPClient.RenameFile, I'm uploading files to temporary folder, then moving them to the final destination folder. I've found that I get an error unless the filename is different. In otherwords if I call this:

Code: Select all

ScSFTPClient.RenameFile('/upload/temp/abc.txt', '/upload/abc.txt')
it doesn't work, but if I call this:

Code: Select all

ScSFTPClient.RenameFile('/upload/temp/abc.txt', '/upload/abc2.txt')
it does work.

Is there a different way to move files (copy/delete is not practical) or do I have to actually change the name when calling RenameFile?

Using Delphi 2010 with SecureBridge 6.1.2

Re: can't move unless filename is different

Posted: Thu 26 Dec 2013 10:19
by Dimon
I can not reproduce the problem. Please let me know the version of your SSH server.

Re: can't move unless filename is different

Posted: Tue 31 Dec 2013 04:17
by dcornelius
I appreciate your response and I have to admit I can no longer reproduce it either! I'm embarrassed, but I'm sure I saw what I did--otherwise, why would I have programmed around it?

FWIW, the log when I connect with WinSCP says:
Server version: SSH-2.0-OpenSSH_5.6
so there's the answer to that question.

Anyway, there is no issue, it's uploading to temp folders and renaming to the main folder just fine now.

Thanks,
David Cornelius

Re: can't move unless filename is different

Posted: Tue 31 Dec 2013 08:15
by Dimon
It is good to see that the issue has been solved. Feel free to contact us if you have any further questions about SecureBridge.