Adminschoice.com Forum Index

FTP Script (Transfering File to NAS)

 
Post new topic   Reply to topic    Adminschoice.com Forum Index -> Unix Shell Scripting
View previous topic :: View next topic  
Author Message
masifahmed



Joined: 06 Feb 2010
Posts: 2

PostPosted: Mon Jul 19, 2010 1:08 am    Post subject: FTP Script (Transfering File to NAS) Reply with quote

Hi Experts,

I'm newbie in Shell Srcipt Programming. I want to copy some binary files to remote server through ftp script. I got a script which is working fine like coping files to remote server. But I want to put some conditions in script like if the file already exists so should n't be copy to remote server. Where to put those conditions in script.



LOCALDIR=/backup/archive

REMOTESERVER=192.0.0.132

REMOTESERVER=/dump/archive

LOGIN=admin

PASSWORD=xyz

FTPLOG='/tmp/ftplog'

date >> $FTPLOG

cd $LOCALDIR

ftp -n $REMOTESERVER <<INPUT_END

quote user $LOGIN

quote pass $PASSWORD

cd $REMOTEPATH

prompt off

mput *.*

exit

INPUT_END


Regs
Masifahmed
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Adminschoice.com Forum Index -> Unix Shell Scripting All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group