SCP Built-ins ¶
SCP Built-ins enable copying files from one SSH server to another. SSH Built-ins must also be configured for SCP Built-ins to work. Additionally, reading and writing access to the respective servers is required.
For Windows users copying to/from local, instructions are available at the bottom of this section.
Syntax
1 | copy(<fromFile String>,<toFile String>) |
Parameters
-
fromFile - The source file
-
toFile - The target file
Note:
Each copy
step allows one file and two computers. For multiple instances of copy
, a separate step must be created for each.
Example
1 2 3 4 | stepdef "copy" copy("/Users/Desktop/bunny.jpg","Server2:/Home/Users/Desktop/bunny1.jpg") copy("Server3:/Home/Users/Desktop/rabbit.jpg","/Users/Desktop/rabbit2.jpg") end |
On the first line of the example above, the bunny.jpg
file was uploaded from the local computer's Desktop to the Desktop on Server2
, then renamed bunny1.jpg
. On the second line, the rabbit.jpg
was downloaded from from Server3
to the local computer and renamed as rabbit2.jpg
.
Note: If a file name is not added to the target file destination, the file will keep the source name.
Remote computer locations (Server2
and Server3
in the example above) must have a colon (:
) following their name. Additionally, there are no whitespaces between the fromFile
and toFile
strings.
Copying To/From a Local File on Windows¶
When copying to or from a local file using Windows, the path needs to include local:C:\\
at the beginning.
Example
1 2 3 | stepdef "copy" copy("local:C:\\Desktop\intaqt\myFile.csv","local:C:\\Desktop\oldfiles\oldFile2.csv") end |