Transfer Result Check throws "File Already exists. Delete existing file" exception...

Advertisement

manfromregina1
Guest

Transfer Result Check throws "File Already exists. Delete existing file" exception...

Hello,

We are using the WinSCP .NET library (which came with version 5.5.3) and it was working was great for us until couple of days ago when we starting getting these exceptions during file upload. The thing is the file does upload successfully by calling the putfiles method below. However, the subsequent call to check the transfer result throws an exception stating the file already exist. Exact text is "Press 'Delete" to delete the file and create new one instead of overwriting it".

var transferResult = session.PutFiles(localPathToUploadFile, remoteFilePath, false, transferOptions);

transferResult.Check();

The thing is that these are brand new files and so there should be no existing files to update, plus the same code was working fine until a few days ago which leads to me believe there could be something on the server which could be triggering the behavior as well.

Is the transferResult.Check() doing more than just checking?

Please help

Thanks!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: Transfer Result Check throws "File Already exists. Delete existing file" exception...

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

manfromregina1
Guest

Re: Transfer Result Check throws "File Already exists. Delete existing file" exception...

Turns out this issue is not WinSCP related but a firewall issue with the server. Please ignore this post. Thanks for your quick follow up.

martin wrote:

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

Advertisement

You can post new topics in this forum