I have the following code that seems to work sometimes :-(
If I have 2 files in the source directory
the mget gets the files, and the mdelete deletes them as expected.
BUT
If I have more than 2 files in the source directory
the mget gets the files BUT the the mdelete does run
Any help would be great.
ftp -v -n $SOURCEHOST <<END
user $USERID $PASSWD
bin
lcd $DATAPATH
cd $SOURCEDIR
pwd
ls -l
mget $FILES
mdelete $FILES
bye
quit