I am using .NET script for WinSCP v5.15.19.
I am trying to download ALL files from the '/home/folder/inbox.app/Payments/FPS' folder on an SFTP Server.
I want to download all the files and delete them once they have downloaded. As a result I am using the following command...
$session.GetFiles('/home/folder/inbox.app/Payments/FPS/*', 'C:\LocalFolder\', $true, $transferOptions)
I would expect this to download all the files in the folder and then delete all the files it has successfully downloaded.
I have tried the following:
$session.GetFiles('/home/folder/inbox.app/Payments/FPS/', 'C:\LocalFolder\', $true, $transferOptions)
This 'kind of' works (ie. it downloads all my files), but it deletes the "FPS" folder - which I don't want to do.
Am I doing anything wrong?