Re: Put local file into remote, but have local file selected from latest-modified folder.
Consider starting with this PowerShell code:
https://winscp.net/eng/docs/script_download_most_recent_file#powershell
And adjust it for your needs (selecting latest directory, not the latest file).
https://winscp.net/eng/docs/script_download_most_recent_file#powershell
And adjust it for your needs (selecting latest directory, not the latest file).