{{ transformations:FileTransferAction.png}}
====== FILE TRANSFER ======
Category: Workflow / External\\

\\ 
=====Description=====
This action can perform various commands on files and folders on a remote server over an SSH connection using the SFTP or SCP protocol:
  * Upload file(s)
  * Download file(s)
  * List files
  * List folders
  * Delete file(s)
  * Create folder
  * Rename folder
  * Delete folder

\\ 
=====Action settings=====
^ Setting  ^ Description  ^
|Protocol|Select the transfer protocol to use.  Options:  //SFTP// or //SCP//.|
|Connector<sup>*</sup>|Select the pre-configured connector, or create a new connector, to the remote server.|  
|Command|Select the file/folder command to perform.  Options:  //Download//, //Upload//, //List files//, //List folders//, or //Delete file//.|
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
\\ 
====Download settings====
**Description:** Downloads files from a remote location to a local folder.
^Setting ^Description ^
|Remote file(s)<sup>*</sup>|Enter the name of the file to be downloaded.  Use wildcards to download multiple files.|
|Local folder<sup>*</sup>|Enter or browse to and select the local folder to save the downloaded file(s) to.|
|If a file with such name already exists|Select how EasyMorph will handle situations when the downloaded file already exists in the local folder.  Options: //Overwrite// (the existing file is overwritten), //Do nothing// (the file is not downloaded), or //Halt project execution// (the workflow stops and a warning is displayed).|
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
\\ 
====Upload settings====
**Description:** Uploads files from a local folder to a remote destination.
^Setting ^Description ^
|Local file(s)<sup>*</sup>|Enter or browse to the file to be uploaded.  Use wildcards to upload multiple files.|
|Don't use temporary files (unsafe)|Check this to upload directly without the use of temporary files.|
|Remote folder<sup>*</sup>|Enter or browse to and select the remote folder to save the uploaded file(s) to.|
|If a file with such name already exists|Select how EasyMorph will handle situations when the uploaded file already exists in the remote folder.  Options: //Overwrite// (the existing file is overwritten), //Do nothing// (the file is not uploaded), or //Halt project execution// (the workflow stops and a warning is displayed).|
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
\\ 
====List files settings====
**Description:**  Produce a list of files, with selected details, in a specified folder on the remote server.
^ Setting  ^ Description  ^
|Remote folder<sup>*</sup>|Select a subfolder on the remote resource to access.|
|Columns|Select the details of the found files to be included in the dataset.  Each detail produces a column.  Options:  //File name\\ with full path//, //File name only//, //File extension//, //Size//, and //Date modified//.|
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
\\
====List folders settings====
**Description:**  Produce a list of subfolders under the selected folder.
^ Setting  ^ Description  ^
|Remote folder<sup>*</sup>|Select a folder on the remote resource to retrieve a list of subfolders from.|
|Columns|Select the details of the found subfolders to be included in the dataset.  Each detail produces a column.\\  Options:  //Folder name with full path// and //Folder name only//.|
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
\\
====Delete file settings====
**Description:** Deletes the specified file stored on the remote resource.
^ Setting  ^ Description  ^
|Remote file(s)<sup>*</sup>|Enter the filename(s) of the remote file(s) to delete.  Wildcards are supported.|
|If the file doesn't exist|Select how EasyMorph handles situations when the specified file does not exist.  Options:  //Do nothing// (nothing happens, the workflow continues, no error is displayed), or //Halt project execution// (workflow stops, an error is displayed).|
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
\\ 
====Create folder settings====
**Description:** Creates a new folder under the selected parent folder.
^ Setting  ^ Description  ^
|Parent folder<sup>*</sup>|Select an existing folder that the new folder will be created in.|
|Folder name<sup>*</sup>|Enter the name of the new folder.|
|If a folder with such name already exists|Select how EasyMorph handles situations when a folder with the same name as the new folder already exists.  Options:  //Fail// (workflow stops, an error is displayed) or //Do nothing// (nothing happens, the workflow continues, no error is displayed).|
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
\\ 
====Rename folder settings====
**Description:** Changes the name of the selected folder.
^ Setting  ^ Description  ^
|Folder<sup>*</sup>|Select an existing folder to be renamed.|
|New name<sup>*</sup>|Enter a new name for the selected folder.|
|If a folder with such name already exists|Select how EasyMorph handles situations when a folder with the same name as the new folder already exists.  Options:  //Fail// (workflow stops, an error is displayed) or //Do nothing// (nothing happens, the workflow continues, no error is displayed).|
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
\\
====Delete folder settings====
**Description:** Removes the selected folder. 

The folder must be empty. Non-empty folders can't be deleted.

^ Setting  ^ Description  ^
|Folder<sup>*</sup>|Select an existing folder, or enter a folder name, to delete.|
|If the folder doesn't exist|Select how EasyMorph handles situations when the selected folder to delete doesn't exist.  Options:  //Do nothing// (nothing happens, the workflow continues, no error is displayed) or //Fail// (workflow stops, an error is displayed).|
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\
\\
=====Remarks=====
When using SFTP, use the wildcard to transfer multiple files at once.

\\ 
=====See also=====

  * [[transformations:sshcommand|SSH command]]