Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP SQL Anywhere, on-demand edition 1.0 SP 6 » Task syntax

TransferFiles task

Transfers files from one host to another.

Syntax 1 (SQL)
CALL DBCloud.TransferFiles ( source_host=source_host, source_path=source_path, target_host=target_host, target_path=target_path [, optional-parameters ] )
Syntax 2 (Cloud Command utility)
dbcloudcmd run TransferFiles source_host source_path target_host target_path [ optional-parameters ]
Parameters
  • source_host

    The host that files are transferred from. Accepts a host name, ID, or a search query that returns a host. (Required)

  • source_path

    The file path of the files to be transferred. (Required)

  • target_host

    The host that files are transferred to. Accepts a host name, ID, or a search query that returns a host. (Required)

  • target_path

    The file path that files are transferred to. If specifying a directory, append the directory separator (\ Windows or / Linux). (Required)

  • delete_source_after_copy

    Set to 1 to delete source files after copy completes. The default is 0.

Required privileges

ManageSystemResources

Remarks

This task transfers files from one host to another.

Note Linux specificThe permission of the target file or directory is not maintained by the task. The mode is defaulted to 0777 for the directory and 0644 for the file, and will be modified by the process's umask in the usual way.

The TransferFiles task is a direct binary file copy from one host to another host. There is no file processing whatsoever.

Example

Run the following task to transfer files from the source directory on the host HostA to a target directory on the host HostB:

dbcloudcmd run TransferFiles HostA "c:\source\filename.txt" HostB "d:\target\"

Run the following task to transfer the diagnostic file merged.txt from the host HostA to the host HostB:

dbcloudcmd run TransferFiles HostA "c:\merged.txt" HostB "c:\merged.txt"