Remove files from Remote server
Thank you!!! That worked. I did not notice the "True" parameter.
Session.GetFiles can remove the downloaded files for you. Just pass $True to the remove parameter.
$session.GetFiles works as expected. It is the $session.RemoveFiles command that I am having trouble with. Once I download the PDF files, I would like to remove the PDF files from the remote location. Only the remote PDF files.
$True to the remove parameter of Session.GetFiles:
$session.GetFiles("/Home/folder/files.pdf", "D:\daily files", $True, $transferOptions).Check()
$session.GetFiles("/Home/folder/files.pdf", "D:\daily files", $False, $transferOptions).Check()
$session.RemoveFiles("/Home/folder/files.pdf")
Cannot find an overload for "RemoveFiles" and the argument count: "3"