Re: Need to Download ALL files from the current date date
Assuming you are referring to file timestamp (what your first code uses), not to some timestamp in a filename (what your second code uses), then this should do:
If you do not need PowerShell, you can do this even in a plain scripting:
See https://winscp.net/eng/docs/script_download_most_recent_file#alternatives
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.FileMask = "*>=1D"
$session.GetFiles(
"/users/*.txt", "C:\HPHC TEST\*", $False, $transferOptions).Check()
If you do not need PowerShell, you can do this even in a plain scripting:
get -filemask=*>=1D /users/*.txt "C:\HPHC TEST\*"
See https://winscp.net/eng/docs/script_download_most_recent_file#alternatives