"DuplicateFile" method fails with "Operation not supported"

Advertisement

nevi
Joined:
Posts:
7

"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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,552
Location:
Prague, Czechia

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.

Reply with quote

nevi
Joined:
Posts:
7

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
  • Log.txt (6.66 KB, Private file)
Description: The acoount, file and folder names and ip addresses in the log files are anonymized.

Reply with quote

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

Reply with quote

Advertisement

You can post new topics in this forum