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

Thiemo

Re: Scripting: File transfer fails with "The file exists." [resolved]

martin wrote:

The "The file exists" is not WinSCP error. I do not even see it in your code. Where does it come from?


If the error is not from WinSCP it must be an internal PowerShell error of the Move-Item command. After the SCP transfer the files get moved from a intermediary directory to the final one. I case a file was transferred already once before and an application puts a write lock on it, the move should fail. I tried that artificially and received a similar error message but not the very same.

Thanks for the confirmation that the error is not one of WinSCP. :)
martin

Re: Scripting: File transfer fails with "The file exists."

The "The file exists" is not WinSCP error. I do not even see it in your code. Where does it come from?
Thiemo

Scripting: File transfer fails with "The file exists." [resolved]

Hi all,

I script WinSCP with PowerShell and repeatedly but not consistently run into the problem, that after an apparently successful transfer the script fails with "The file exists."

We use the following and cannot update to newer versions:
WinSCP 5.5.1 build 3970
Windows Server 2008 R2 Enterprise Service Pack 1
SCP

I attached script and log file. Is there a possibility to get additional information about the failure?

Kind regards

Thiemo