The Copy File(s) action will copy a File or a set of files that match a file spec to the destination file or directory. You can use wildcards in the source setting to copy more than one file (the "Destination is a directory" property will be set automatically). To copy files from subdirectories as well, check the Recurse property. If the target directories do not already exist, check the Force Directories property to make FinalBuilder create the directories as needed.
When copying a single file (not using wildcards), then you can use the Destination field to rename the file at the same time as copying it to another location.
The Copy/Move FileSet action provides more sophisticated support for choosing files to copy.
If a file already exists at the destination, select how you would like the action to behave - fail, skip or overwrite.
Destination is a directory - Set this option to indicate that the destination is a directory name, not a file name.
Force Directories - If this option is set and the destination directory, or any parent directories, do not exist, then they will be created.
Clear Attributes - If this option is set, the destination file will be created with all attributes (Archive, Read Only, Hidden, System) cleared.
Recurse - Set this option to search for file spec matches in subdirectories of the source directory.
Fail if Zero Files Copied - If this option is set and no files are copied, the action will fail.
Log Files Copied - Each file copied will be logged. If this option is not set, only skipped files or files with errors are logged.
The Action properties available are :
property FileSpec :WideString; // the file specification for the files to copy. You may use Wildcards.
property FilesAffected : integer ; // read only, the number of files Copied
property Target :WideString; // The target file or directory
property Force : WordBool; //Use Force Directories to create a directory and all parent directories that do not already exist.
property TargetIsDir : WordBool;// Specifies that the Target Is a Directory
property FailIfExists : WordBool;// Fail if the target file Exists
property Overwrite : WordBool; // Overwrite existing files
property OverwriteReadOnly : WordBool;//Overwrite Read Only Files
property Recurse : WordBool;// Recurse subdirectories, only valid if the target is a directory
property ClearAttributes : WordBool // clear the copied file's attributes.
property FailIfZeroFiles : WordBool;
property LogFilesAffected : WordBool;