0

I'm working with a propriety system that has implemented custom FTP commands. Specifically the command that I'm interested in takes 5 arguments , is it possible to use the python ftplib to send such a complex command?

ftp.sendcmd() 

The function above does not appear to be capable of send this complex command.

In my example, the function looks like this:

SITE_CUSTOM_CMD(args1, arg2, arg3, arg4, arg5)

I'm new to python so your feedback is very welcomed.

1 Answer 1

1

To send your own command use FTP.sendcmd. This function takes a single argument which is the whole command string. Arguments are separated by spaces in FTP commands, i.e.

ftp.sendcmd(" ".join([cmd, args1, arg2, arg3, arg4, arg5]))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.