FTP Batch file

jayken

Disciple
Hey folks!

A simple doubt, I am trying to connect to a linux server, to retrieve files thru ftp. I tried to write a batch file, which would open a cmd window, connect to the server and would ask me to enter username and pass.

new file ->
ftp ipaddr

save-> ftp.bat

execute ftp.bat and it should wait for username.

Can someone tell me, how to automate the process of entering username and password? Is it possible to give user input to batch files?
 
Hey thanks for the reply.

Try this,
i wrote this simple script at work,

ftp 192.xxx.xxx.xxx ( some linux server ip address )

and placed the file on the desktop.
the batch file didn't work, rather it did but didn't connect to the server and it kept on executing this command without any effect.

on issuing the following command before "ftp"

cd..

which takes u to one dir prior
<C:\Documents and Settings\jayken\Desktop>
to
<C:\Documents and Settings\jayken\>

then ftp address works fine.

If you are confused,
old file-->
ftp ipaddress

new file-->
cd..
ftp ipaddress

I've saved the file as ftp.bat on the desktop.

can some tellme what the problem could be?
 
Back
Top