Re: Best way to check if multiple files exists before upload
You can do:
See https://winscp.net/eng/docs/script_checking_file_existence#library
Though it really looks like could use
https://winscp.net/eng/docs/library_session_synchronizedirectories
$files =
$session.EnumerateRemoteFiles(
"/remote/path", $null, [WinSCP.EnumerationOptions]::None);
if ([Linq.Enumerable]::Any($files))
{
...
}
See https://winscp.net/eng/docs/script_checking_file_existence#library
Though it really looks like could use
Session.SynchronizeDirectories
instead:
https://winscp.net/eng/docs/library_session_synchronizedirectories