Appendix G. File Utility Sub Routines For Windows Systems; File Utility Sub Routines; File Utility Functions - IBM Prerequisite Scanner User Manual

Table of Contents

Advertisement

Appendix G. File utility sub routines for Windows systems

Prerequisite Scanner has a set of common file sub routines in the/lib/
common_function.vbs file to handle files. It also has a set of functions for handling
files.
Table 35 describes the file utilities.
Table 35. File utility sub routines
Sub routine
appendToFile(text,
fileName)
writeToFile(text,
fileName)
Table 36 outlines the file functions that handle files.
© Copyright IBM Corp. 2009, 2012
Description
Appends the text to the end of the
specified file.
Writes the text to the specified file,
overwriting the existing contents if
necessary.
Table 36. File utility functions
Function
"allFiles()" on page 114
"filterFile()" on page 118
"findNewest()" on page 118
"findSuitableFile()" on page 119
"ppread()" on page 124
"readFile()" on page 124
Input parameters
v text, a string that contains the text to
append to the file
v filename, a string that represents the
name of the file to modify
v text, a string that contains the text to
write to the file
v filename, a string that represents the
name of the file to modify
Description
Reads the file names in a specified directory
into an array.
Reads and filters the contents of a file to a
scripting dictionary object.
Finds the latest configuration file.
Finds the relevant configuration file for a
product and version.
Reads the contents of a file to a scripting
dictionary object, further splitting each line
in the file by the specified separator input
parameter if that separator exists in the line.
Reads each line of a file into an index entry
of an array.
129

Advertisement

Table of Contents
loading

Table of Contents