Post a reply

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

Guest

Re: "DuplicateFile" method fails

That explains it all!
I wasn't aware of that prerequisite.
Thank you very much for your help!

best regards
Neilsean Lavlund Victorino
nevi

Re: "DuplicateFile" method fails

Hello
Thank you for the quick response.
I am using the FTP protocol, which can be seen in the attached session log file.

best regards
Neilsean Lavlund Victorino
martin

Re: "DuplicateFile" method fails

What protocol are you using?

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
nevi

"DuplicateFile" method fails with "Operation not supported"

Hello

I am using the .NET assembly of WinSCP 5.13.1 (Build 8265) from PowerShell on Windows 10.

I have followed the good and detailed descriptions in the WinSCP web site for using the assembly in PowerShell. But unfortunately, the DuplicateFile method is generating an exception, when I try to call it. More specifically, I get the following error message:
Exception calling "DuplicateFile" with "2" argument(s): "Operation not supported."

I specified a session log file in my script, from where I see a similar entry:
> 2018-05-16 15:47:29.008 Script: cp "/remote/folder1/File2.txt" "/remote/folder1/Backup/"
< 2018-05-16 15:47:29.011 Script: Operation not supported.

I have no problems downloading the file, then uploading it to the destination folder. But I would really like to avoid this.

For the record, I also have no problem using the MoveFile method on the same file and folders.

Please advise.
Best regards,
Neilsean Lavlund Victorino