Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

dsutcliffe

WinSCP-5.12.2.RC-Automation Session.DuplicateFile

I tried this new feature today and I successfully copied files on our SFTP server. When I tried to copy the same files again I got the following message because they already exist in the target folder:

General failure (server should provide error description).
Error code: 4
Error message from server (en-US):

Common reasons for the Error code 4 are:
- Renaming a file to a name of already existing file.
- Creating a directory that already exists.
- Moving a remote file to a different filesystem (HDD).
- Uploading a file to a full filesystem (HDD).
- Exceeding a user disk quota.

I suppose I was expecting that DuplicateFile method would overwrite any existing file with the same name rather than error, but I can see why you have done it like this. Is there anyway to add a Boolean that if set will give me the option to overwrite, aka VBScript object.CopyFile?