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:
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 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 ()