We use WinSCP to transfer incoming files from one server to another server for processing. This works well but it means that WinSCP runs (sometimes a very long time) until it has exhausted the incoming files; i.e., it has reached the point of exceeding the incoming feed. On these long-running sessions, the log files can grow quite huge and it would be more helpful and manageable if the session could be broken into smaller chunks by limiting the number of files it will retrieve.
The alternative is to do a two-pass script where WinSCP first gets the list of files, trims it to the desired number, and then does another WinSCP to transfer the files based upon the list. Of course, this is even uglier because in both cases, WinSCP does its own LS of all the available files in order to get the list of files to determine how to proceed. So, in effect, it is getting the file list three times.
If a limit could be specified, then it simplifies the operation. Thanks.