Re: WinSCP removes/deletes files from SFTP server after transfer
Well, I hoped that you would name the exact files that have the problem. "Some files" is not specific enough.
But after investigating the log files, I'll assume that the files that had the problem were
The difference is that for the second run, the files already existed on the server. Both files are over 100 KB, what is the threshold for WinSCP to upload the files using a temporary name. When the upload finished, WinSCP deleted the existing files and renamed the temporary files to the target names. From the log file, I can see that WinsCP did that correctly. If it instead resulted in lost files, I'm 99% sure that it's a bug in the server.
You can try to prevent the bug from occuring by disabling the use of the temporary files:
See https://winscp.net/eng/docs/scriptcommand_put#resumesupport
Though you better the get the server fixed.
But after investigating the log files, I'll assume that the files that had the problem were
users.csv
and enrollments.csv
.
The difference is that for the second run, the files already existed on the server. Both files are over 100 KB, what is the threshold for WinSCP to upload the files using a temporary name. When the upload finished, WinSCP deleted the existing files and renamed the temporary files to the target names. From the log file, I can see that WinsCP did that correctly. If it instead resulted in lost files, I'm 99% sure that it's a bug in the server.
You can try to prevent the bug from occuring by disabling the use of the temporary files:
"put -resumesupport=off C:\Users\alexl\Documents\alexlike23\users.csv /" ^
See https://winscp.net/eng/docs/scriptcommand_put#resumesupport
Though you better the get the server fixed.