-4

Simple question, how do I connect to a FTP using a powershell script? I can easily connect to the FTP using the command prompt with something such as:

ftp "ip address"
"some username"
"some Password"

But when I try to connect to the FTP using the above code in a script I cannot connect, all i see is the prompt asking for username. Is there some kind of method that needs to be used in order to connect after giving the FTP "ip address" in a script?

Adlis
  • 95
  • 1
  • 11

1 Answers1

0

I found the answer that i needed using ftp -s:"filewithcommands" probably should have explained a bit more on what i wanted. The below being what is inside "filewithcommands"

open
IP address
user
pass
cd "targetdir"
get "file"
quit
Adlis
  • 95
  • 1
  • 11