
COMP 230 COMP230 Week 6 Quiz Answers
COMP 230 COMP/230 COMP230 WEEK 6 QUIZ
- (TCO 6) Which line will properly create the object for VBScript File I/O?
- (TCO 6) To test to see if a file exists before you overwrite it in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) _____.
- (TCO 6) To move the file C:\Data\CustData.txt to C:\BackUp\CustData.txt in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) _____.
- (TCO 6) To test to see if a file is not Read Only, use the following VBScript code _____.
- (TCO 6) The following command opens a text file in VBScript.
Set file = fso.OpenTextFile(“C:\Data\CustData.txt”, ?, ??, ???)
To open a file for appending, the value of ? must be _____.
Set file = fso.OpenTextFile(“C:\Data\CustData.txt”, ?, ??, ???) To create a new file if it doesn’t exist, the value of ?? must be _____. |
- (TCO 6) The following command opens a text file in VBScript.
Set file = fso.OpenTextFile(“C:\Data\CustData.txt”, ?, ??, ???)
To read data from this file, which condition will test to make we are not at the end of the line of text? - (TCO 6) In VBScript, to read the contents of an entire text file into a string variable called fileStr, use the following method (assuming fileObj is a file object created with CreateTextFile( ) or OpenTextFile) _____.
- (TCO 6) In VBScript, to bypass reading the next four characters in a text file, use the following method (assuming fileObj is a file object created with OpenTextFile) _____.
- (TCO 6) In VBScript, to bypass reading the next line of text terminated by a newline (CR/LF), use the following method (assuming fileObj is a file object created with OpenTextFile) _____.