Re: Search recursively download most recent file
Show us your complete code.
Instead of using$session.ListDirectory($remotePath).Files
, use$ession.EnumerateRemoteFiles($remotePath, "*", [WinSCP.EnumerationOptions]::AllDirectories)
(5.8.3 RC version only)
https://winscp.net/eng/docs/library_session_enumerateremotefiles
$session.ListDirectory($remotePath).Files
, use $ession.EnumerateRemoteFiles($remotePath, "*", [WinSCP.EnumerationOptions]::AllDirectories)
(5.8.3 RC version only)