How to download files from the FTP server with PowerShell?
Posted on 2014-10-22
I was wondering if someone could help me to create PowerShell script please.
Basically, I need to create scheduled task (once a day at 1am) to run PowerShell script which will do the following:
1. Connect to folder on FTP server (user+password)
2. Download files from the FTP folder onto computer running PowerShell script
3. Delete files from FTP folder only when download was successful
4. On a computer where downloaded files are stored, keep only two latest copies and the old one needs to be deleted
5. (Optional) Create a basic report (success/fail) and send it as email
Size of the downloaded file (*.zip) can be around 500MB zip file. I’m guessing that script should have some kind of logic to wait until file was fully downloaded.
Thanks in advance