Actions YAML Reference
Properties | List of all members
CopyFileAction Class Reference

Copies one or more files from one location to another. More...

Inherits IntegrationAction, and ISourceFilesOptions.

Inherited by MoveFileAction.

Properties

bool InMultipleFilesMode [get, set]
 Determines whether the action is in multiple-files mode, where the files in MultiFilesSourceFolder that match the criteria of FileFilter are copied or moved. The default value is false. More...
 
FileTarget SourceFile [get, set]
 Specifies the source file path.
For information about how to specify a file in different file systems, see FileTarget.
More...
 
FolderTarget MultiFilesSourceFolder [get, set]
 Specifies the source folder of the files when working in multiple-files mode.
For information about how to specify a folder in different file systems, see FolderTarget. More...
 
FileFilter FileFilter [get, set]
 Specifies the filter properties to use to filter files. More...
 
FileTarget DestinationFile [get, set]
 Specifies the destination file or folder path.
To specify the destination file, set Destination.Path.
For information about how to specify a folder in different file systems, see FileTarget and FolderTarget. More...
 
OverwriteFileOperation OverwriteFileOperation [get, set]
 Specifies the action to take when a file that has the same name already exists in the folder, as follows: More...
 
CommonActionProperties

Describes the common action properties for Actions and ActionGroups.

string Name [get, set]
 Specifies the name. This property cannot be empty and must be unique in the YAML script. More...
 
string Description [get, set]
 Specifies the description. The default value is "". More...
 
ActionRunType RunType [get, set]
 Runs the action by using one of the following types: More...
 
bool IgnoreErrors [get, set]
 Specifies whether to ignore errors and continue with the next action. Valid only for Action and ActionGroup. The default value is false. More...
 
int FailureRetries [get, set]
 Specifies the number of times that the action is retried if it fails. Available only for Action. The default value is 0. More...
 
int RetryInterval [get, set]
 Specifies the interval, in milliseconds, that elapses when a failed action is retried. Valid only when the value of FailureRetries is greater than 0. Available only for Action. The default value is 10000. More...
 

Detailed Description

Copies one or more files from one location to another.

For common action properties, see IntegrationAction.
Example of copying one file:

Actions:
- CopyFileAction:
SourceFile: '%FilePath%'
DestinationFile: C:\Destination\%FileName%
Name: Copy one file
# And more common action properties
...
FileTarget SourceFile
Specifies the source file path. For information about how to specify a file in different file systems...
Definition: CopyFileAction.Properties.cs:104
OverwriteFileOperation OverwriteFileOperation
Specifies the action to take when a file that has the same name already exists in the folder,...
Definition: CopyFileAction.Properties.cs:143
FileTarget DestinationFile
Specifies the destination file or folder path. To specify the destination file, set Destination....
Definition: CopyFileAction.Properties.cs:131
string Name
Specifies the name. This property cannot be empty and must be unique in the YAML script.
Definition: IntegrationAction.Properties.cs:87

Example of copying multiple files:

Actions:
- CopyFileAction:
MultiFilesSourceFolder: '%FileFolder%'
FilePattern: '*.dat'
MaximumFileSize: 99999
FilesOlderThan: 7200000
DestinationFile: C:\Destination\%FileName%
Name: Copy multiple files
# And more common action properties
...
bool InMultipleFilesMode
Determines whether the action is in multiple-files mode, where the files in MultiFilesSourceFolder th...
Definition: CopyFileAction.Properties.cs:97
FolderTarget MultiFilesSourceFolder
Specifies the source folder of the files when working in multiple-files mode. For information about h...
Definition: CopyFileAction.Properties.cs:111
FileFilter FileFilter
Specifies the filter properties to use to filter files.
Definition: CopyFileAction.Properties.cs:117

Example of copying multiple cloud files:

Actions:
- CopyFileAction:
MultiFilesSourceFolder: dropbox://MyDropbox/FromFolder
FilePattern: '*.dat'
DestinationFile: lib://Backup
Name: Copy multiple cloud files
# And more common action properties
...

Property Documentation

◆ InMultipleFilesMode

bool InMultipleFilesMode
getset

Determines whether the action is in multiple-files mode, where the files in MultiFilesSourceFolder that match the criteria of FileFilter are copied or moved. The default value is false.

◆ SourceFile

FileTarget SourceFile
getset

Specifies the source file path.
For information about how to specify a file in different file systems, see FileTarget.

◆ MultiFilesSourceFolder

FolderTarget MultiFilesSourceFolder
getset

Specifies the source folder of the files when working in multiple-files mode.
For information about how to specify a folder in different file systems, see FolderTarget.

◆ FileFilter

Specifies the filter properties to use to filter files.

Example:

FilePattern: '*.txt'
MaximumFileSize: 65536
FilesOlderThan: 3600000

Valid only when the value of InMultipleFilesMode is true.

◆ DestinationFile

FileTarget DestinationFile
getset

Specifies the destination file or folder path.
To specify the destination file, set Destination.Path.
For information about how to specify a folder in different file systems, see FileTarget and FolderTarget.

When in multiple-files mode, the path specifies a folder.
When in single-file mode, if the path has an ending separator, or if a folder exists at the path, it is a folder. Otherwise, it is the file name.

◆ OverwriteFileOperation

OverwriteFileOperation OverwriteFileOperation
getset

Specifies the action to take when a file that has the same name already exists in the folder, as follows:

  • Replace: Specifies that the new content is saved to a file that replaces the existing file.
  • Serialize: Specifies that the new content is saved to a file that uses a serialized number that has the "filename(%d).ext" format.
  • Timestamp: Specifies that the new content is saved to a file that uses a timestamp that has the "filename(yyyy-MM-ddTHH.mm.ss.fff).ext" format.
  • Failed: Specifies that the new content is not saved.

◆ Name

string Name
getsetinherited

Specifies the name. This property cannot be empty and must be unique in the YAML script.

◆ Description

string Description
getsetinherited

Specifies the description. The default value is "".

◆ RunType

ActionRunType RunType
getsetinherited

Runs the action by using one of the following types:

  • Always (default)
  • Never

◆ IgnoreErrors

bool IgnoreErrors
getsetinherited

Specifies whether to ignore errors and continue with the next action. Valid only for Action and ActionGroup. The default value is false.

◆ FailureRetries

int FailureRetries
getsetinherited

Specifies the number of times that the action is retried if it fails. Available only for Action. The default value is 0.

◆ RetryInterval

int RetryInterval
getsetinherited

Specifies the interval, in milliseconds, that elapses when a failed action is retried. Valid only when the value of FailureRetries is greater than 0. Available only for Action. The default value is 10000.


The documentation for this class was generated from the following file: