How to login to ftp in one step?
From the example that you mentioned, be sure to use the -n flag to disable auto-login
C:\adc_ftp>ftp -n -s:ftp_script.txt localhost
Where ftp_script.txt contains something like:
user
ftp
ftppassword
Some ftp commands...
quit
To do this, you need to make a text file.
For instance, to get a file that is located at ftp://ftp.kernel.org/pub/README
this is my text file:
open ftp.kernel.org
anonymous
[email protected]
get /pub/README
bye
I then call ftp using the -s
parameter, like:
C:\Documents and Settings\eleven81\Desktop>ftp -s:ftp.txt
Which worked perfectly for me.