call command

With SFTP and SCP protocols, executes arbitrary remote shell command. With FTP protocol, executes a protocol command. Not supported with WebDAV and S3 protocols.



call <command>


With SFTP protocol, that does not allow execution of arbitrary remote command, separate shell session will be automatically opened.

The command must not require user input.

It is an error, if the command has any error output, but no standard output. To circumvent that redirect the error output to null (2>/dev/null) or to the standard output (2>&1).

If the command execution takes long, you may hit a session timeout. If you need to execute long-running commands, increase the session timeout using the -timeout switch of the open command.

Alias: !

XML log element: call


call mysqldump --opt -u USERNAME --password=PASSWORD --all-databases > all_databases.sql
call gzip -c all_databases.sql > all_databases.gz


Converting to .NET Assembly

When converting script to .NET Assembly, map call command to Session.ExecuteCommand method.

Parameters mapping: Command parameter command maps to method parameter command.

Last modified: by martin