×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

help with FTP (NON Web)

help with FTP (NON Web)

help with FTP (NON Web)

(OP)
I am trying to get ftp to work from powershell but not sure what needs to be done. Is there a way to get powershell to FTP from the command line (without using a web interface)? I have to ftp some firmware and have made a list of the address and the file that will need to be loaded. My csv file will eventually have upwards of 60 IP addresses that I need to log into. Is there a way to call ftp straight from powershell, and wait for the file to load before logging into the next address? Below makes the output in a similar way that I have had luck with using a .bat and ftp -s. Worst case, I could write this to txt file and do a few at a time.

[code]
$File = "C:\firmware.csv"
$FirmwareUpload = import-csv $File
$User = "randomhero"
$Password = "SomeLamePassword"

FOREACH ($Line in $FirmwareUpload)
{
Write-Host open $Line.IP
Write-Host $User
Write-Host $Password
Write-Host bin
Write-Host put $Line.firmware
Write-Host bye
sleep 5
}
[/code]

Thanks in advance!

RE: help with FTP (NON Web)

(OP)
oops...guess thats what preview is for.

CODE

$File = "C:\firmware.csv"
$FirmwareUpload = import-csv $File
$User = "randomhero"
$Password = "SomeLamePassword"

FOREACH ($Line in $FirmwareUpload)
{
Write-Host open $Line.IP
Write-Host $User
Write-Host $Password
Write-Host bin
Write-Host put $Line.firmware
Write-Host bye
sleep 5
}

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close