Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
- List: JavaScript global methods
- JavaScript global method: base64Decode
- JavaScript global method: base64Encode
- JavaScript global method: compile
- JavaScript global method: doHTTPRequest
- JavaScript global method: doSOAPRequest
- JavaScript global method: execute
- JavaScript global method: getLog
- JavaScript global method: help
- JavaScript global method: insertDatum
- JavaScript global method: makeSCWebURL
- JavaScript global method: print
- JavaScript global method: Quit
- JavaScript global method: RCtoString
- JavaScript global method: readFile
- JavaScript global method: setAppMessage
- JavaScript global method: stripHtml
- JavaScript global method: uncompressFile
- JavaScript global method: writeAttachmentToFile
- JavaScript global method: writeFile
- JavaScript global method: xmlstring
JavaScript global method: writeFile
Writes data to the local file system.
Syntax
writeFile( path, mode, object );
Arguments
The following arguments are valid for this function:
Argument | Data type | Required | Description |
---|---|---|---|
path
|
String | Yes | This argument contains the text string or variable value containing the fully qualified path of the file to be written. You must enclose literal text strings in quotation marks. |
mode
|
String | No | Use the string "b" to write a binary file. Use the string "ba" to append to a binary file. Use the string "a" to append to a text file. Use any other string or omit the parameter to write to a text file. This is the default. The values are case sensitive and only the values specified are valid. |
object
|
String | Yes | This parameter contains the text string or variable value containing the data you want to write to a file. |
Return values
A number representing the number of bytes written to a file.
Description
This method writes the contents of the object parameter to the file specified in the path parameter. The file can be in binary format or text format as determined by the binary parameter.
Example
This example does the following:
- Writes the list of currently logged on users to a file
This example requires the following sample data:
- The list of currently logged on users stored in system.users
var userList = system.users; var filePath; var isMode; var fileObject; function writeToFile( path, binary, object ) { print( "Writing " + path + " to file..." ); var output = writeFile( path, mode, object ); print( "The number of bytes written to file was: " + output ); return output } filePath = "C:\\users.xml"; isMode = null; fileObject = userList; writeToFile( filePath, isMode, fileObject );
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to ovdoc-ITSM@hp.com.
Help Topic ID:
Product:
Topic Title:
Feedback: