Post a reply

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)


Topic review


Re: Add ability to specify X number of file to be transferred

Thanks for your suggestion.
Will consider this.

Meanwhile, note that WinSCP 5.10.x can rotate a session log file.

Add ability to specify X number of file to be transferred

It would be very helpful if there was an option to allow specifying a transfer of a maximum number of files. Something like "get -n:NNNN -delete *"

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.