English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am writting a batch file that connects to an ftp server but prompts users for a user name and password. I would like to include the login (user name and password) in the batch file so users do not have to enter this information manually.

2007-02-08 05:40:08 · 2 answers · asked by Paul I 1 in Computers & Internet Programming & Design

2 answers

Use an ftp script file. Basically list each of the commands on a line in order of execution, including the username and password.

for example name the file myfile.ftp on as its contents:

myusername
mypassword
bin
cd myhome
mget *
bye

Then when you call it do ftp -i -s:myfile.ftp ftp.server.com

2007-02-08 05:42:54 · answer #1 · answered by Amanda H 6 · 0 0

use the -n option of the FTP client.

For example (in unix shell):

ftp <<==eof== -n
open myserver
user userid password
get myfile
==eof==

2007-02-08 13:47:06 · answer #2 · answered by BigRez 6 · 0 0

fedest.com, questions and answers