You specify the data files that you want to
capture with a data template by setting up the template rules. A
rule is a logical statement that identifies a particular group of
data files.
The components of a rule are described in Table
6-3.
Table 6-3 Components of a rule
Component
|
Description
|
Directory path and file definition, and the
corresponding Include or Exclude setting
|
The directory path and file definition
specifies a folder, a group of files, or a particular file. You can
include this in the collection, or exclude it from a folder or
group of files that was included by an earlier rule.
You can use variables as building blocks to
specify part or all of the directory path. For example, to collect
files from the C:\Documents and settings\<user name>\My
documents folder for each user, you can set the path using the
variable $MyDocuments$.
You can use wildcard characters to specify
the group of files. For example, you can use * to select all files
and subfolders or *.ext to select all files with the specified
extension.
Note: You cannot specify more than one file name
or extension type in a rule. You need to create a new rule for
each.
If you are using relative paths, you may
need to specify a partial directory path in each rule. The partial
path is appended to the source path that you set up earlier to
determine the complete directory path. Do not duplicate any part of
the source path in the rule.
You must specify a file definition in each
rule. If you want to collect everything in the source path, you
need to use the asterisk (*) wildcard character.
|
Criteria for file selection by date
|
This component is optional. By default all
files specified in the directory path and file definition are
selected. You can filter the selected files by creation date,
modification date, or date last accessed. You can specify a
particular date range to select all files in the range. You can
select all files created, modified, or accessed during the previous
days or months, by specifying the number of days or months.
For example, you may want to select just the
files that have been accessed by the user in the previous three
months. Any other files are ignored.
|
File size restrictions
|
This component is optional. You can select
just the files that are greater than or less than a specified
size.
For example, you may want to select all
files smaller than 100 KB, and ignore any larger files.
If you want to select files between a
minimum and maximum size, you need to set up two rules: the first
to include all files less than the maximum size, and the second to
exclude all files less than the minimum size.
|
The rules in a data template are evaluated in the
order in which they are listed. This determines which folders and
files to collect. You should set up the rules to select files and
folders starting from the top level and working downwards. For each
level, you need to include the folders and file groups that you
want, then exclude those that you don't want.
You can add new rules or modify existing rules at
any time.
1.
|
|
In the Properties for <Template name>
window, in the Rules tab, do one of the following:
|
- Click Add Rule
to add a new rule.
- Select the rule that you want to edit, then click Edit Rule.
2.
|
|
In the Rule Definition window, select the
action to apply to the files selected in this rule:
|
3.
|
|
In the DirPath/RegPath box, specify the
directory path and file definition for the group of files to
select.
|
You can type the entire path or use
variables as building blocks where appropriate.
To add a variable, click V, then select it from the list of available
variables.
You can only use the variables that
are contained in the list. If you type any other variables, even
though they are valid in the operating system, the directory path
will not be resolved.
For more information on the available
variables, see Move the User
variables.
4.
|
|
If you want to select files by date, under
Date, check Apply to files.
|
If you don't want to select files by
date, ensure the Apply to files option is unchecked, then go to
step 7.
5.
|
|
In the drop-down list, select the file action
to which the date criteria applies:
|
6.
|
|
Under Date, set the date criteria by selecting
the appropriate option and entering the relevant details:
|
Between
|
Set the start and end dates of the range by
clicking each box and selecting the date from the calendar.
|
During the previous Months
|
Set the number of months by typing the
appropriate number, or by clicking the arrow buttons to change the
current value.
Months are counted from the current day to
the corresponding day of the appropriate month, not the complete
calendar month.
|
During the previous Days
|
Set the number of days by typing the
appropriate number, or by clicking the arrow buttons to change the
current value.
Days are counted from the current time to
the same time on the appropriate day, not the complete day.
|
7.
|
|
If you want to select files by size, under
Size, check Apply to files.
|
If you don't want to select files by
size, ensure the Apply to files option is unchecked, then go to
step 10.
8.
|
|
In the drop-down list, select the condition to
which the file size criteria applies:
|
9.
|
|
In the KB box, specify the file size in
kilobytes.
|
You can do this by typing the
appropriate number, or by clicking the arrow buttons to change the
current value.
10.
|
|
Click OK to save the
rule.
|
Repeat this procedure for each rule that you need
to set up, until you have specified all of the files that you want
in this data template.
Note: The rules are added to the data template in
the order that you create them. If necessary, click Move Up or Move
Down to rearrange the list. The rules are evaluated in the order in
which they are listed.