Re: moving the current list of files in the remote server
You cannot do this with a simple script.
You better use WinSCP .NET assembly from a PowerShell script.
Check this: https://winscp.net/eng/docs/script_local_move_after_successful_upload
Just replace
You better use WinSCP .NET assembly from a PowerShell script.
Check this: https://winscp.net/eng/docs/script_local_move_after_successful_upload
Just replace
PutFiles
with GetFiles
and Move-Item
with $session.MoveFile
.