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

martin

Re: Error message: Destination directory already contains file. (Does not)

It seems to be a bug in your SFTP server. When WinSCP tries to create the new file, your server reports:

. 2020-09-15 13:27:04.254 Opening remote file.
> 2020-09-15 13:27:04.254 Type: SSH_FXP_OPEN, Size: 62, Number: 22531
< 2020-09-15 13:27:04.254 Type: SSH_FXP_STATUS, Size: 69, Number: 22531
< 2020-09-15 13:27:04.254 Status code: 4, Message: 22531, Server: /RemoteDir/Filename.xml already exists, Language:

And even later, when WinSCP reads the file attributes to show them on the overwrite confirmation dialog, the server reports back some bogus values, instead of returning an error:
. 2020-09-15 13:27:04.254 Cannot create new file "/RemoteDir/Filename.xml", checking if it exists already
> 2020-09-15 13:27:04.254 Type: SSH_FXP_LSTAT, Size: 46, Number: 22791
< 2020-09-15 13:27:04.270 Type: SSH_FXP_ATTRS, Size: 29, Number: 22791
. 2020-09-15 13:27:04.270 Asking user:
. 2020-09-15 13:27:04.270 **Overwrite remote file 'Filename.xml'?**
. 2020-09-15 13:27:04.270
. 2020-09-15 13:27:04.270 Destination directory already contains file 'Filename.xml'.
. 2020-09-15 13:27:04.270 Choose, if you want to overwrite the file or skip this transfer and keep existing file.
. 2020-09-15 13:27:04.270
. 2020-09-15 13:27:04.270 New: 1 581 bytes, 2020-09-15 11:59:50
. 2020-09-15 13:27:04.270 Existing: 0 bytes, 2020-09-15 00:00:00 ()
JW

Error message: Destination directory already contains file. (Does not)

WinSCP version 5.17.7

Even when I try to upload a file for the first time I get a message that destination directory already contains file, even though it does not exist.
If I answer Yes the file will be uploaded.
If a try with FileZilla the file is uploaded without any error messages.
Log file is attached.