Wednesday, October 7, 2009

automate ftp

ftp server: remote host from which you want to get file. Make sure that ftp server is installed and sharing is enabled.
ftp client:local machine

syntax: ftp ip_address
then give user_id
then password

Automation
create a file with below content
///// ftp.txt ////////////
server_login_id(like admin)
server_password( sid)
bin
cd full_path (cd users/admin/directory/)
get file_name(get test.txt)
bye
/////////////////////////

automated command
ftp -s:ftp.txt ftp.server.com
or ftp -s:ftp.txt ftp.server.ipaddress