Re: Don't quite understand how to write get with - delete in powershell
Oh, I may have figured it out- I may just have to change $False to $True...
Correct. Set the
remove
argument of the Session.GetFiles
to $True
:
$transferResult = $session.GetFiles("/directory/XDOWNLOADS/fileA", "c:\windowsdirectory\fileA", $True, $transferOptions)
See:
https://winscp.net/eng/docs/library_session_getfiles
https://winscp.net/eng/docs/scriptcommand_get#net