8,330 questions
Here's an example that you can modify.
$cmds =@("open localhost
anonymous
******@foo.com
dir foo.txt
quit")
$Response = $cmds | ftp.exe
$foo = $Response -match 'foo.txt'
if ($foo.count -eq 0) {
"It's not there"
} else {
"We found this..."
$foo
"Send your email here."
}