Differences

This shows you the differences between the selected revisions of the page.

scriptcommand_call 2015-07-30 scriptcommand_call 2025-03-06 (current)
Line 1: Line 1:
-====== call ======+====== call command ======
With [[protocols|SFTP and SCP protocols]], executes arbitrary [[remote_command|remote shell command]]. With [[protocols|SFTP and SCP protocols]], executes arbitrary [[remote_command|remote shell command]].
-With FTP protocol, executes a protocol command. Not supported with WebDAV protocol.+With FTP protocol, executes a protocol command. Not supported with WebDAV and S3 protocols.
===== Syntax ===== ===== Syntax =====
Line 7: Line 7:
  call <command>   call <command>
-===== Remarks =====+===== [[remarks]] Remarks =====
With SFTP protocol, that does not allow execution of arbitrary remote command, separate [[shell session]] will be automatically opened. With SFTP protocol, that does not allow execution of arbitrary remote command, separate [[shell session]] will be automatically opened.
Line 14: Line 14:
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''). 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 ''[[scriptcommand_open#timeout|-timeout]]'' switch of the ''[[scriptcommand_open|open]]'' command.
Alias: ''!'' Alias: ''!''
Line 27: Line 29:
</code> </code>
-===== Converting to .NET Assembly =====+===== [[net]] Converting to .NET Assembly =====
When [[library_from_script|converting script to .NET Assembly]], map ''call'' command to ''[[library_session_executecommand|Session.ExecuteCommand]]'' method. When [[library_from_script|converting script to .NET Assembly]], map ''call'' command to ''[[library_session_executecommand|Session.ExecuteCommand]]'' method.
Parameters mapping: Command parameter ''command'' maps to method parameter ''command''. Parameters mapping: Command parameter ''command'' maps to method parameter ''command''.

Last modified: by martin