WiseScript Editor Reference
82
be written back to the file. The loop repeats for each line of the file. This action requires
an End Statement.
To complete the dialog box
z
Pathname
Specify the full path to the text file to be edited on the destination computer
(example: %WIN%\Sample.txt).
z
Variable
Specify the variable in which to store each line of the text file (example: TEXTLINE).
z
Action
Select an action:
Read lines of file into variable
Reads a line into the variable, but does not write it back to the original file.
Update file with new contents of variable
Reads a line into the variable, and at the end of the loop, writes the contents of
the variable back to the line in the text file.
z
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 script TextFile.wse uses this action. For details on sample scripts, see
ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.
See also:
End Statement
on page 61
Read/Write Binary File
This action reads from a binary file to a variable, or writes from a variable to a binary
file. If you write to the file, the existing information in the file is not moved, it is
overwritten.
This action does not support reading or writing non-ASCII characters (characters with
codes above 127).
To complete the dialog box
z
File Pathname
Specify the path of the file to be read (example: %MAINDIR%\File.exe).
z
Variable Name
Select or enter the variable that is to be read into or written from.
z
File Offset
Enter the number of bytes into the file to start writing or reading. Bytes are
numbered starting with zero.
z
Max. Length
Enter the maximum number of bytes to be written to or read from the file. When
writing, if the length of the variable exceeds this value, the string is truncated.
When reading, any trailing spaces are trimmed.
Summary of Contents for ALTIRIS INVENTORY 7.0 SP2 - FOR NETWORK DEVICES V1.0
Page 1: ...WiseScript Editor Reference ...
Page 31: ...WiseScript Editor Reference 31 ...
Page 91: ...WiseScript Editor Reference 91 ...
Page 148: ...WiseScript Editor Reference 148 ...