Rey 619
2011-11-28 09:38:00 UTC
a. Scripting.FileSystemObject
b. FileSystemObject
c. Scripting.FileSystem
d. WScript.FileSystemObject
2. What file attribute value in VBScript indicates that the file is ReadOnly?
a. 0
b. 1
c. 2
d. 4
3. To test to see if a file is not ReadOnly, use the following VBScript code.
a. If NOT file.Attributes OR 1 Then
b. If NOT file.Attributes AND 1 Then
c. If NOT file.Attributes XOR 1 Then
d. If file.Attributes NOT 1 Then
4. To copy the file C:\Data\CustData.txt to C:\BackUp\CustData.txt in VBScript, use the following command (assuming that fso is a Scripting.FileSystemObject).
a. fso.FileCopy(“C:\Data\CustData.txt”,”C:\BackUp\CustData.txt”)
b. fso.FileCopy(”C:\BackUp\CustData.txt”, “C:\Data\CustData.txt”)
c. fso.CopyFile(“C:\Data\CustData.txt”,”C:\BackUp\CustData.txt”)
d. fso.CopyFile(”C:\BackUp\CustData.txt”, “C:\Data\CustData.txt”)
5. 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 _____.
a. 1
b. 2
c. 8
d. True
6. The following command opens a text file in VBScript.
Set file = fso.OpenTextFile(“C:\Data\CustData.txt”, ?, ??, ???)
To ensure that the file is formatted as ASCII instead of as Unicode, the value of ??? must be _____.
a. 0
b. -1
c. 2
d. - 2