deleting multiple files through ftp

Hi,

I have a situation where I need to delete multiple files from a folder once I connect to FTP server. I am using ftp script to get the files, number of files always vary from 1 to 100. once I get the files I need to delete all the files downloaded I am making a list of all the files downloaded and store in a variable so at the end when I am ready to delete files my variable will have all the names of files to be deleted like....
VAR_FILES_DELETE=file1 file2 file3 file4 file4

I am using a command del ${VAR_FILES_DELETE} this is not working it is just deleting file1 why is it not deleting all the files...?
or is it a limitation that we can delete only one file at a time...?

is there any other way to delete multiple files once I get connected to FTP...?

Please help.

Thanks,

you can use a wildcard and mdelete or mdel:

ftp -i -n <<EOF
open whatever
user user pass
mdelete /path/to/files/*.log
EOF

Thanks for reply but, I do not want to delete all the files that are there but only list of files and there are different extensions files....

echo "
 open nodename
 user me pass
 cd /path/to/files
"       > ftp_$$.tmp
while read file
do 
    echo "delete $file"
done < list_of_files >> ftp_$$.tmp

echo "
 bye
 " >> ftp_$$.tmp

ftp -n < ftp_$$.tmp

That worked thanks