get-ftp -server myserver -user myuser -password mypassword -ssh -force -path /path/to/data/*.csv | foreach-object -process {
get-ftp -server myserver -user myuser -password mypassword -ssh -force -path "/path/to/data/" -remotefile ($_.Filename) -localfile ("C:\path\to\data\" + $_.Filename)
send-ftp -server myserver -user myuser -password mypassword -ssh -force -path "/path/to/data/" -remotefile ($_.Filename) -rename ("/path/to/data/" + $_.Filename)
|