Here i am writing a sample script which was very helpful for me.
There was a requirment to FTP some files Daily which were generated Daily in our live server to Billing servers in Maldives.
I used following small script to automate this process.
======================================================================
root@oracle-R-D # vi ftp-automate (Use your own name)
HOST=(Remote Server IP address)
FTPUSER=(FTP User id in remote server)
FTPPASSWORD=(FTP User Password)
ftp -n $HOST << -EOF
user $FTPUSER $FTPPASSWORD
lcd /(File location path in local server)
cd /(Directory path where you want to put th file in remote server)
bin
prompt off
mput (Or mget)
bye
EOF
Make sure thet you give the Execution permission to script file.
PowerDesk Pro 6.0
Using Ftp (User Friendly Reference)
The TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols Reference
No comments:
Post a Comment