How to login to ftp in one step?

6

C:\adc_ftp>ftp sysadmin:ftp@localhost <----Looking for a 1 line login like this
Unknown host sysadmin:ftp@localhost. <---doesn't work
ftp> bye

This works but not how I would like to log in:

C:\adc_ftp>ftp localhost 
Connected to myPC.xxx.com.
220-FTP server
    WarFTPd 1.82.00-RC11 (Sep 22 2006) Ready
    (C)opyright 1996 - 2006 by Jarle (jgaa) Aase - all rights reserved.
220 Please enter your user name.
User (myPC.xxx.com:(none)): sysadmin
331 User name okay, need password.
Password:
230 User sysadmin logged in from host localhost (127.0.0.1)
ftp>

I'm trying to make a batch file that logs into the ftp server. I tried examples like this one, but it doesn't take the login information and just sits at the "Please enter your user name".

Tommy

Posted 2010-01-20T20:02:12.610

Reputation: 599

Answers

6

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 

heavyd

Posted 2010-01-20T20:02:12.610

Reputation: 54 755

4

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
root@kernel.org
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.

eleven81

Posted 2010-01-20T20:02:12.610

Reputation: 12 423

The separate txt file is what I was missing. I thought I could script opening ftp from the .bat. Thanks! (Now my bat file calls the .txt script.) – Tommy – 2010-01-20T20:23:11.923

0

Auto-login to Filezilla in one step:

  1. Create Site Profile in Filezilla, specifying the username and password (if you don't have one already)
  2. Create a shortcut to Filezilla somewhere. (Mine's on the quick launch bar)
  3. Right-click the shortcut to go into it's properties.
  4. Append the end of the Target with --site="0yoursiteprofile". The 0 is indicates it's a saved profile (as opposed to the default profile.)

The whole Target field should be something like:

"C:\Program Files\FileZilla FTP Client\filezilla.exe" --site="0yoursiteprofile"

Spaces, slashes and other symbols may need to be escaped if you have them in your profile name, so just avoid them, or read more about Filezilla's command-line switches.

That's all -- just click the shortcut to launch and login!

img


Note that within Filezilla's Shortcut's properties, you can also add a shortcut key-combination if desired.

ashleedawg

Posted 2010-01-20T20:02:12.610

Reputation: 395

0

This worked for me

================  ftp.txt  =================
open "ftp.ZZZZZ.com"
user "username" "password"
cd public_html
prompt
hash
put thursday.htm
cd thursday_files
lcd thursday_files
mput *
bye
=============================================
ftp -n -s:ftp.txt

adrian rice

Posted 2010-01-20T20:02:12.610

Reputation: 1