Manage Text File
The Manage Text File object will
append, insert, read, delete, find and replace, and find lines in a
text file.
How it is used
The Manage Text File object can be
used to append lines to a log file to create audits trails of
policies. You can also use the Manage Text File object to find and
replace information in a template file that will be used by another
application.
Configuration
When configuring the Manage Text
File object you need to choose the action that you are taking on
the text file and then configure the Details tab.
To select the type of
action you want to take:
1.
|
Open the Manage Text File object for
editing.
|
3.
|
From the Type drop-down list, select the operation that you
want to take:
|
Append Line - Details Tab
File
|
Type the path and name of the
file that you are appending the line to. You can use the ellipsis
(...) button to browse for the
file.
|
Line to append
|
Type the text that will be
appended to the file.
|
Insert Line - Details Tab
File
|
Type the path and name of the
file that you are inserting the line to. You can use the ellipsis
(...) button to browse for the
file.
|
Insert text
|
Type the text that will be
inserted into the file.
|
Line
|
Type the line number where the
text that you entered in the Insert
Text field will be inserted.
|
Read Line - Details Tab
File
|
Type the path and name of the
file that you are reading. You can use the ellipsis (...) button to browse for the file.
|
Read the last line of the
file
|
Select to read the last line of
the text file
|
Read line number
|
Select and type the number of
the line that you want to read.
|
Read a range of lines
|
Select and specify what group
of lines that you want to read:
•
|
From
<line number> to <line number> - Type the
From line and To
line values to specify the range of lines that will be read.
The range will include the From line and To line and all lines in
between them.
|
•
|
From
<line number> to last line - Type the From line value that will be the beginning of range
of lines that will be read. The range will include the From line
and all lines after it until the end of the file.
|
•
|
Last
<number> of lines - Type the number of lines that will be read from the end of
the file.
|
|
Delete Line - Details Tab
File
|
Type the path and name of the
file from which you are deleting lines. You can use the ellipsis
(...) button to browse for the
file.
|
Lines
|
Type the line numbers that you
are deleting. Use hyphens (-) to create ranges of lines. For
example, typing '1-9' will delete lines 1, 2, 3, 4, 5, 6, 7, 8, and
9. You can also enter multiple sets of lines by separating them
with commas (,). For example, typing '1, 3-9, 20' will delete line
1, lines 3 to 9, and line 20.
|
Find First Line - Details
Tab
File
|
Type the path and name of the
file that you are searching. You can use the ellipsis (...) button to browse for the file.
|
Search text
|
Type the text that you are
searching for in the file. Only the first line that matches the
text will be returned.
|
Case sensitive
|
Select to cause the search to
only find lines where the casing of the words matches the text from
the Search text field exactly.
|
Find All Lines - Details
Tab
File
|
Type the path and name of the
file that you are searching. You can use the ellipsis (...) button to browse for the file.
|
Search text
|
Type the text that you are
searching for in the file. All lines that match the text will be
returned.
|
Case sensitive
|
Select to cause the search to
only find lines where the casing of the words matches the content
of the Search text field exactly.
|
Find and Replace - Details
Tab
File
|
Type the path and name of the
file that you are searching. You can use the ellipsis (...) button to browse for the file.
|
Search text
|
Type the text that you are
searching for in the file.
|
Replacement text
|
Type the text that will replace
the Search text in the file that you
are searching.
|
Case sensitive
|
Select to cause the search to
only find lines where the casing of the words matches the content
of the Search text field exactly.
|
Available Published Data
Name
|
Description
|
File path and name
|
The full path of the text file
that is being managed.
|
Full text of the file
|
The text within the file. You
can store a maximum of 64 kilobytes of text in this Published Data
item.
|
Number of lines
|
The data that populates this
item depends on the action that you select from the Type drop-down list on the General tab:
•
|
Append Line – number of lines in the
file after the line was appended.
|
•
|
Insert Line – number of lines in the
file after the line was inserted.
|
•
|
Read Line – the number of lines in the
file.
|
•
|
Delete Line – number of lines in the
file after all specified lines were deleted.
|
•
|
Find First Line – the number of lines
in the file.
|
•
|
Find All Lines – the number of lines
found.
|
•
|
Find and Replace – the number of lines
that were found and replaced.
|
|
Line text
|
The text of the line that was
retrieved.
|
Line number
|
The line number that was
retrieved.
|