PowerShell/ - FTP Download Script

PowerShell/ - FTP Download Script

Cancelled

Job Description

i need a powershell script developed that will do the following:
1) look in the running folder for a list of accounts to process.
e.g. c:¥temp¥server1.down;c:¥temp¥server2.down
file format would be something like:
========================
proto=ftp
host=ftp.blah.com
port:21
user:username
pass:password
remote_dir=/remote/dir
remote_files=* (or filename1_date.txt,filename2_date.txt,etc.)
days=30
local_dir=c:¥temp¥dir¥
success_email=[email protected]
failure_email=[email protected]
smtp_add=mail.server.com
smtp_port=25
smtp_user=user.name
smtp_pass=password
smtp_subject=blahblahblah
smtp_body=html email content
========================
2) login to host
3) list files based on a specific criteria (e.g. last x days or specific files that are loaded from a csv file).
4) transfer the files to a local directory and log the transfer (size,times,dates, etc).
5a) confirm against the remote file that files are downloaded correctly.
5b) re-run if failed
6) place the logfile in the download directory dependant on the status of the transfer. e.g. 20130101.ok or 20130101.fail
7) send an email with log files to required account

Other things to consider;
- i need the script to run a batch mode to pull in the data from multiple locations simultaneously, so would need to run a maximum of (x) sites per run and keep loading the next if