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

martin

Re: 551 File listing failed happening on FTP transfer of multiple files

There's indeed no way to make WinSCP retry in this scenario, as WinSCP has no reason to believe the error is recoverable.
If you need such custom error handling, you can use the WinSCP .NET assembly from a PowerShell script.
This examples might be a good start:
https://winscp.net/eng/docs/library_example_keep_local_directory_up_to_date
https://winscp.net/eng/docs/library_example_two_way_synchronize_delete
https://winscp.net/eng/docs/library_example_recursive_download_custom_error_handling
Ranuzzi

551 File listing failed happening on FTP transfer of multiple files

Hello,

apologize if this issue has been alrady addressed but I was not able to find it.
Basically I am using a bat scheduled file to automatize a file tranfer of several files (1000), I am currently using the sync function of WinSCP although every time during the transfer the error '551 File listing failed' appears and it is on a random number of files (2-4) and on random files.
I am using the batch continue option but this is skipping the files instead of retrying and I need to check every single file.
  /command ^
    "option batch continue" ^
    "open ftps:%ftpuser%:%ftppwd%@%ftpsource%:990 -implicit -timeout=12000" ^
    "lcd %wrkpath%" ^
   "synchronize local ""%wrkpath%\%boxpath%"" ""%boxpath%""" ^
    "exit"

I was trying to include an automatic retry when this issue happens but I was not able to find the right options, could you kindly advise on how to solve this?

Best Regards,
Giovanni