marcusd 0 Newbie Poster

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.