Copy Files
The CopyFile task allows you to copy files from a directory or a directory tree. The 'move' option deletes the original files, after a successful copy operation. The 'rename' option renames the original file (or files) to the new name (or names).
Source Directory
Enter the full pathname of the
directory where your source files exists.
Target Directory
Enter the full pathname of the
directory where you need to put the target files.
Filename
For the Copy
and Move options only, enter the filename filter for the files you
wish to copy using the following
wildcard rules. This field also supports dynamic
variables. Using dynamic variables, you can select a file
based on current date/time in addition to the normal wildcard search.
For the Rename option, the above wildcard options only apply for
the file to pass the filename filter. If the file passes the
filename filter, then its newly renamed name will depend on the
Rename Filename field.
Rename Filename
This is a required field for the
rename option. Rename Help
Folder Path Filter
Leave
this field blank if you want all folders to be processed. If you need
specific folders to be processed, then enter the folder name or path,
using the following wildcard rules.
If a folder passes the filter, then all its subfolders will also pass
the filter.
Simple Example: Folder = c:\test , subfolders =
john, john\old, sam, sam\old, joe, joe\old
Folder path filter =
john . john and john\old are processed
Folder
path filter = jo . john,
john\old, joe, joe\old are processed
Folder path filter = old
. sam\old, john\old, joe\old are processed
Folder path
filter = test . all files in c:\test
and its sub folders are processed
Folder path filter = john\old.
only john\old is processed.
Folder path filter = c:\test\john
. john and john\old are processed
Place files in new subdirectory
If you
select "None", no new subdirectory is created within the
Target Directory.
If you select Date, a new subdirectory based on
the date is created within the Target Directory. All files are placed
in this directory.
If you select Date, a new subdirectory based
on date and time is created within the Target Directory. All files
are placed in this directory.
Include subdirectories
If you select this
option, all subdirectories and files within the Source Directory are
copied to the Target Directory. If a subdirectory does not
exist within the Target directory, then it is automatically created.
Append to Filename
If
you are regularly coping a file and wish to save each copy to a
different filename based on current time/date, choose
the append file option which best suits your copying frequency and
file naming needs.
Date Filter
If you need to filter files based on
file modified date, select this option. For the between option, enter
2 values separated by '-' (2-4 etc.). Examples:
Older than 5
Minute, Newer than 2 Day, Between 3-5 Day, Between 1-4 Hour
Delete empty subfolders after Move
The move
option first moves all files that meet the filename criteria, and
other criteria. By default, empty subfolders are not deleted,
after all files are moved out. This is done by design. Many
production systems may need these empty subfolders to remain in
place. This is for other processes to move new files into these empty
subfolders.
If you need to delete empty subfolders after the
Files have been moved, select this option. Please note that all
empty subfolders in the source folder will be deleted. This is true
even if there were no files in those subfolders, at the start of the
move option.
Check for critical folder
This option is added to
prevent accidentally processing files within critical folders.
Many of our users use dynamic variables for the source and target
folders. Sometimes, inadvertently, the dynamic result could be
c:\ or / etc which may result in undesirable consequences.
The
folders checked include:
1) Root folders (c:\ or d:\ or / etc..)
2) User home folder
3) Folders in the
system library path.
If you have to use these folders (c:\ or d:\ or / etc..), and the folder filter or filename filter, you can disable this option if you are absolutely sure that no critical system or data files will be adversely effected..