Post a reply

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

afts

filepart transfer issues – HELP needed with script

We build a batch file dynamically to move a large number of files to our SFTP server using WinSCP since the server is not in our network. About half the time, the files don't complete successfully.

What is wrong with the commands shown that create the error in the logs shown below:
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
    "open sftp://AFTSAdmin:%%21WB5eH.... / -hostkey=""ecdsa-sha2-.....DTpTIvq0="" -rawsettings CacheDirectories=0 CacheDirectoryChanges=0 ResolveSymlinks=0" ^
    "cd /_SeattleStmt/...." ^
    "lcd P:\STMT\...\...\FEB-01_1.....SSWR_003" ^
    "put -resume -nopreservetime -nopermissions filename..... 010CEVU24U5O20A.zip" ^
    "put -resume -nopreservetime -nopermissions _icfiles\*.csv" ^
    "exit"

Log:
* 2022-02-01 18:13:31.384 Error message from server: Internal error.
. 2022-02-01 18:13:31.384 Asking user:
. 2022-02-01 18:13:31.384 Transfer was successfully finished, but temporary transfer file 'filename ....zip.filepart' could not be renamed to target file name 'filename...zip'. If the problem persists, you may try to turn off transfer resume support. ("No such file or directory.
. 2022-02-01 18:13:31.384 Error code: 2
. 2022-02-01 18:13:31.384 Error message from server: Internal error.")
< 2022-02-01 18:13:31.384 Script: Transfer was successfully finished, but temporary transfer file 'filename.......zip.filepart' could not be renamed to target file name 'filename.......zip'. If the problem persists, you may try to turn off transfer resume support.
< 2022-02-01 18:13:31.384 Script: No such file or directory.
< 2022-02-01 18:13:31.384 Error code: 2

Is "turn off transfer resume" trying to tell me to remove -resume that in the PUT command? When sending via SFTP don't we need that to make sure the file continues if there is a connection issue? These can be larger 200–900 meg zip files...

Thank you for any help or suggestions for testing.