So using the code from that link:
[void][Reflection.Assembly
]::LoadFro
m("C:\Indy
Net-Daily-
20051007\I
ndy.Socket
s.dll")
$ftp = new-object Indy.Sockets.FTP
$
ftp.Disconnect()$
ftp.Host = $ftphost
$
ftp.Username = $username
$
ftp.Password = $password
$
ftp.Connect()$
ftp.Passive=$true;
wc = new-object System.Net.WebClient
$wc.Credentials = New-Object System.Net.NetworkCredenti
al($strFtp
User,$strF
tpPass)
$ls = new-object System.Collections.Special
ized.Strin
gCollectio
n;
$
ftp.List($ls, "", $true);
foreach($file in $ls){
"Downloading {0} into {1}.." -f $sourceFileName, $targetDir;
$
ftp.Get($sourceFileName, ($targetDir + $sourceFileName), $true, $false);
}