Printing ZPL via cmd/command line

Dear Zebra community,

I would like call on your help. I'm trying to send ZPL code directly from matlab to our Zebra (network) printer. Currently, we open the Zebra Setup Utilities and insert the code manually. I would like to get rid of the manual step.

Zebra support has provided me with instructions for FTP file transfer, see attachment. I used the instructions and applied them via cmd/command line manually, with a positive result. However, these are multiple commands, including inserting a (default) username. If I insert the sequential commands, I'm able to print the ZPL code. However, I'm not able to send just one command to get the labels printed.

When using the same code in matlab, the first command is no problem when inserting it via the 'system' or 'dos' function. The IP address of the printer is accepted. But then the user name is required and I can't use the 'system' or 'dos' function to insert the username. So here it stops.

Therefore I am searching for a way to send the ZPL code to the printer with only one command (including definition of IP address and filename pathway)? Is there anyone who can help me with this issue?

Thanks in advance for your replies!

Best regards,

Lode