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: Filetransfer successful but File does not exist on remote server

For a start, just add ls command after the upload. It will at least log the list of files on the server, so you will have some evidence, when talking to the server owners.
paddytokey

Re: Filetransfer successful but File does not exist on remote server

Hi martin,
thanks for your reply.

I would think the same, unfortunately I have no access to Logs from the receiving server and their support hit me with a "well it looks like the files where never uploaded, otherwise they would be on the server" ...

Since I'm not a developer by any means, I have no experience in coding and had hoped there would be an easier explanation or way around.

The weirdest thing about all of this is the fact that we can verify some of the files transfered in this particular batch have been received and processed by the receiving end, while some haven't but ALL of them are marked as transfered in the log. To make things worse: there seems to be no pattern, it's not like the last third fails or the beginning or whatever, the failed uploads were just spread across the whole batch of files.

Sorry I'm just venting, thank you for taking the time to respond. I'll be looking for another way to get those files over there, perhaps I can zip them and transfer that file, then unzip on the server to make sure all of them are in the batch.
martin

Re: Filetransfer successful but File does not exist on remote server

The server acknowledged the upload. So from the perspective of WinSCP, the upload succeeded. If the file were lost somewhere on the server, you will have to check server-side logs. All you can do from client side is to list remote directory after the upload and verify that the files are there. You cannot do such verification automatically in the WinSCP script though. That would require a more advanced language. Though I'm quite sure that this will turn out to be some misunderstanding. It does not really happen that a server acknowledges a transfer and then loses the files.
paddytokey

Filetransfer successful but File does not exist on remote server

I'm upload a bunch of xml files to an FTP Server using a batch file that calls WinSCP, which uses as Script file to upload all xml files from a local folder to the SFTP target location. This happens once every hour and usually goes fine, however we've now come across several cases where the files never arrived on the SFTP target.
I'm using /log to create a logfile of the uploads, and a loop to restart the upload in case of an error.
However, in these cases, the log does not show any Error, it shows that the file has been uploaded successfully. Here's an excerpt of the log from a file I know has not been transfered succesfuly:

. 2020-04-30 12:30:02.790 File: 'File_Name_123.xml' [2020-04-30T10:15:30.867Z] [337]
. 2020-04-30 12:30:02.791 Copying "File_Name_123.xml" to remote directory started.
. 2020-04-30 12:30:02.791 Binary transfer mode selected.
. 2020-04-30 12:30:02.792 Opening remote file.
> 2020-04-30 12:30:02.792 Type: SSH_FXP_OPEN, Size: 52, Number: 45059
< 2020-04-30 12:30:02.803 Type: SSH_FXP_HANDLE, Size: 13, Number: 45059
> 2020-04-30 12:30:02.803 Type: SSH_FXP_WRITE, Size: 362, Number: 45574
> 2020-04-30 12:30:02.804 Type: SSH_FXP_CLOSE, Size: 13, Number: 45828
> 2020-04-30 12:30:02.804 Type: SSH_FXP_SETSTAT, Size: 48, Number: 45321
< 2020-04-30 12:30:02.816 Type: SSH_FXP_STATUS, Size: 24, Number: 45574
< 2020-04-30 12:30:02.816 Status code: 0
< 2020-04-30 12:30:02.817 Type: SSH_FXP_STATUS, Size: 24, Number: 45828
< 2020-04-30 12:30:02.817 Status code: 0
. 2020-04-30 12:30:02.817 Preserving timestamp [2020-04-30T10:15:30.000Z]
< 2020-04-30 12:30:02.827 Type: SSH_FXP_STATUS, Size: 24, Number: 45321
< 2020-04-30 12:30:02.828 Status code: 0
. 2020-04-30 12:30:02.828 Transfer done: 'File_Name_123.xml' => '/in/File_Name_123.xml' [337]

I've had an Upload where only 13 out of 58 files were transmitted, however no error appears in the Logfile.
Is there any way to verify the transmission? Could there be a setting I'm missing that causes this behaviour?
Files are typically around 1-3KB in size, an upload can contain anywhere from 20 to 200 files.