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

Advertisement

JW
Joined:
Posts:
1

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.
  • WinSCP.log (11.02 KB, Private file)

Reply with quote

Advertisement

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

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

Reply with quote

Advertisement

You can post new topics in this forum