|
Navigation: IM Sequencer > Schedule tasks > Steps > FileCopyMove step |
![]() ![]()
|
The FileCopy step enables you to copy a file or files from a source location to a destination location.
You need to set a couple of settings before you can use this step type:
| Source filename / pattern |
| The file name that needs to be copied to the destination location, you can also use an "*" to define an file name pattern, for instance SAPHR_*_FULL.txt will match the following files that are named: SAPHR_10-10-2009_FULL.txt |
| SAPHR_09-10-2009_FULL.txt |
| SAPHR_08-10-2009_FULL.txt |
| SAPHR_09-10-2009_FULL.txt |
| Source directory |
| The directory where the source files are located (according to the filename/pattern). |
| Destination directory |
| The directory where the file(s) will be copied to. |
| Destination file name |
Set alternate destination file name
Check this option to define an alternate destination file name, this can be useful when the source file name/pattern results in multiple file.
You can use a few options to renames the file using a datetime or random number. The dynamic example field will help you to see the final results when using these parameters.
| Parameter {0} is the sourcefile name without the extension |
| Parameter {1} is the extension without the "period" |
| Parameter {2} is the current date time. You can use {2: dd-MM-yyyy} to use day, month year. Normal datetime formatting does apply here |
| Parameter {3} is a random number between 1 and 9999. You can use leading zeroes to always have 4 numbers for instance {3:0000}. This will lead to 4 zeroes being appended. |
| More information about the formatting can be read here: |
Remove the source file when it is being copied, only the file that is actually being copied will be removed not all files that match the pattern. |
Advanced copy options tab
| Multiple file copy mode |
| Copies the files that match the file name pattern, you can provide 3 options: |
| - Copy oldest file only : the oldest file in the source directory that matches the filename pattern will be copied. |
| - Copy newest file only : the newest file in the source directory that matches the filename pattern will be copied. |
| - Copy all files : all files in the source directory that matches the filename pattern will be copied. Note: The file "LastWriteTime" property is used to determine the newest/oldest file |
| Remove files from source directory if older than 'X' days Removes the file according to the filename pattern from the source directory if creation date is older than 30 days. |
| Remove files from destination directory if older than 'X' days Removes the file according to the filename pattern from the destination directory if creation date is older than 30 days. |
| Enable source file lock detection Before the actual copy takes place the file will be checked if it is locked, this can be useful when the file is already created but the process creating the file is not yet ready writing the file. To detect the lock the file will be opened for reading, if this fails the file is locked. |
| Enable source file size detection Before the actual copy takes place the file size initial size will be stored, the process will wait 2 seconds and check the file size again, when the size is increasing the process will wait again, until the size no longer changes within 2 seconds. |

Advanced file copy options
Backup options tab
| Make Backup Check this option if you want to backup the file before it would be overwritten. This only applies if the destination file already exists, when the file does not exist the backup will not be made. This is the directory is can be "relative" to the destination directory where the backup files will be located or set as an absolute path |
| Remove backup files if older than 'X' days Check this option if you want to remove back upped files in the backup directory when they are older then 'X' days, the file creation date will be used to determine how old the file is. |

Backup options
Impersonate options tab
| Impersonate Check this option if you want to impersonate when you are copying the file. Impersonation can help if the Service Account for the IM Sequencer Service does not have the appropriate rights to access the file that have to be copied. |
| - Username Username used during impersonation, you can use Domain\Username combination. |
| - Password Password for specified username. Note: The provided credentials will not be tested during setup, if you provide the wrong credentials the impersonation will fail, impersonation will revert at the end of this step type. |
| - Use remote impersonation |
Use this option if the username and password cannot be validated on the current machine. For instance when you want to copy files from or to another computer in another domain or workgroup you should |
| enable this option to forward the credentials for that remote connection. |

Impersonate options
Page url: http://www.traxionsolutions.com/imsequencer/help/index.html?filecopysteptype.htm