Insert Line Into Text File - Symantec WISESCRIPT PACKAGE EDITOR 8.0 - REFERENCE FOR WISE PACKAGE STUDIO V1.0 Reference

Table of Contents

Advertisement

Insert Line Into Text File

WiseScript Package Editor Reference
This action edits a text file on the destination computer. Use it to edit configuration files
that cannot be edited by Edit INI File, Add Device to System.ini, Add Command to
Config.sys, or Add Command to Autoexec.bat.
You can insert a new line at a particular line number, or you can search for text and
insert a new line before, after, or in place of the line where the text was found. Either
complete the Line Number field or the Search for Existing Text section. Do not
complete both because you can only do one or the other.
To complete the dialog box
File to Edit
Specify the path of the text file to edit (example: %SYS32%\File.txt).
Text to Insert
Enter the text to add to the file. If the line refers to a directory or file, start the path
with a variable (example: %MAINDIR%\Application.exe).
Line Number
Enter the line number at which to insert the new text. Enter 0 to append to the end
of the file. Information in the Search for Existing Text area overrides any line
number that is specified here unless the text is not found.
Search for Text
Enter the text to search for. If more than one line in the file matches, only the first
is edited.
Comment Text
Enter comment to insert at the beginning of the found line. When replacing an
existing line, use this to leave the existing line in place but inactive. Set Insert
Action to insert before the existing line so that subsequent installations find and
edit the active command, not the commented line.
Insert Action
Select the action to be taken when a line is found.
Match Criteria
Select how the line is matched with the text in Search for Text.
Ignore White Space
Mark this to ignore spaces and tab characters.
Case Sensitive
Mark this to make the match case-sensitive.
Make Backup File
Mark this to make a copy of the text file before editing it. A number is appended to
the end of the file name for the backup copies (example: text.001, text.002, and so
on).
The sample scripts Add Tnsnames entry.wse and TextFile.wse use this action. For details
on sample scripts, see ScriptHelp.htm in the Samples subdirectory of this product's
installation directory.
WiseScript Actions
173

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Wisescript package editor 8.0

Table of Contents