I need to send a command before transferring the file. How do I do this?
TElSimpleSFTPClient has ExecuteCommand method that executes a command via command tunnel.
Some servers (mainly mainframe ones) require a command to be send to set up data upload parameters. These servers not necessarily expect a shell command -- it's possible that what looks like a "command" is just the use of SFTP protocol operations. Eg the "command" "ls /something" is not a real shell command but a request to ListDirectory() method with "/something" as a name to list.