Parfum Shop's Blog

You come when you need, away when you get

FTP Shell Script for sending File with auto login and multiple put.

By • Jul 6th, 2009 • Category: Linux, Programming

FTP Shell Script for sending File text and XML

#/bin/sh
ftp -vin catur.web.id < quote user username
quote pass password
cd antara/
lcd /ftpserver/tarekot-home/kontan/
mput *.txt
mput *.xml
bye
!!
mv /ftpserver/send/*.txt /home/backup
mv /ftpserver/send/*.xml /home/backup

Create file called ftp.sh and save. Then open add cronjob with command

# crontab -e

For example I put this job every 5 minutes;

*/5 * * * * sh /root/ftp.sh > /dev/null 2>&1

is
Email this author | All posts by

Leave a Reply