ftp multiple files from same directory

Hi there Gurus,

I have the following ftp script:

$ more ftp_dump_arch4.sh
#! /usr/bin/ksh

# Constant variables
HOST='xx.xx.xx.xx'
USER='user'
PASSWD='password'
dir='/export/file'
ftp_log='/tmp'

ftp -n $HOST > $ftp_log/ftp.log << END

user $USER $PASSWD
verbose
lcd $dir
bin
mput *dmp.gz ---> any files with this dmp.gz extention will be ftp
mput * ---> the rest of the files are not copied over when there aren't any dmp.gz files available... how do i resolve this?? :confused:

bye

wait
exit 0

thanks!!

wee

sadly you can't check such condition inside a ftp script..
you check the condition before entering the ftp..

I checked and no such issue for me. It should still send all the files (*) even if .dmp.gz files are not there. You should add -i option to the ftp command or add "prompt" command before the mput. Also add -v option for debugging.

hey all,

by putting -i it works!! :smiley:

thanks rikxik for the help! :b:

wee