Let's assume for the time being you are a hobbyist user or are doing this in a sandpit fashion.
curl() can be used for FTP, even to transmit.
wget (wput) also.
and there is ncftp (for background asynchronous transfer) and lftp.
.netrc is a good idea, even from root.
But your "echo" is disturbing. If you want easy remote commands install putty-tools and use "plink". There is also "pscp" if you would care to check it out. Professionals may decry these tools, but they are great for your home network, cron jobs, and quick scripting.
These are SSH tools, and can be as powerful as formal products such as Ansible. They require an SSH server, and open ports to reach it, and possibly identity credentials. I apologise if if SSH is off topic for you, the type of script seen in the popular answer by Jack is often seen in sftp transfers (note the "s").
As an aside, you can run CGI like commands from FTP, but this is not generally spoken of, nor publicly encouraged. It involves watching for the transmitted file or using a write only "dummy" file on a customised server.
(Arcane example follows).
In the "TK4-" distribution of MVS3.8 on the Hercules (now Hyperion) mainframe emulator, remote job entry is effected by FTP transfer to the file AAINTRDR which stands in for a card reader to read the "cards" in your file.
nick@AccessDenied:~$ ftp ftp> echo "hi" ?Invalid command ftp>
ftp
doesn't have anecho
command.lftp
does, but it's purely local, so I don't see why you'd want to do that by itself....