As implied by my previous answer, you cannot implement this (selecting N latest files) using a simple scripting. Scripting can select one latest file only.
For a such a complex task, you would have to use WinSCP .NET assembly, from e.g. a PowerShell script.
But modify it to select N files:Select-Object -First N
And then loop over the found files, like this example does:
Though you will want to upload them and you will want to change their target file name.
Select-Object -First N