NcFtp has got free scriptable multi platform ftp clients which are developed at least since the year 2000. If you have to use ftp with scripts, give it try.
ncftpput, ncftpget and ncftpls will make your life easier.
How to Delete Files via FTP in a Script?
Sadly, there is no ncftpdelete or the like. But to remove files scripted via ftp from a windows machine, you can use the scripting feature of windows’ own ftp client.
First, create a text file called
del.ftp with content like this:
ftp -s:del.ftp. This will execute all the ftp commands in the file