1. Question :
(TCO 6) What WSH object is used for VBScript File I/O?
Student Answer: Scripting.FileSystemObject
FileSystemObject
Scripting.FileSystem
WScript.FileSystemObject
Instructor Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week
Explanation: 6 Lecture
Points Received: 0 of 2
Comments:
Question 2 Question :
. (TCO 6) What file attribute value in VBScript indicates that the file
is ReadOnly?
Student Answer: 0
1
2
4
Instructor Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 6
Explanation: Lecture
Points Received: 2 of 2
Comments:
Question 3 Question :
. (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) .
Student fso.MoveFile(“C:\Data\CustData.txt”,”C:\BackUp\CustData.txt”)
Answer:
This study source was downloaded by 100000845689434 from CourseHero.com on 05 -05-2022 11:33:57 GMT -05:00
https://www.coursehero.com/file/17498202/Comp-230-Quiz-Week-6/
, fso.MoveFile(”C:\BackUp\CustData.txt”, “C:\Data\CustData.txt”)
fso.FileMove(“C:\Data\CustData.txt”,”C:\BackUp\CustData.txt”)
fso.FileMove(”C:\BackUp\CustData.txt”, “C:\Data\CustData.txt”)
Instructor Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 6
Explanation: Lecture
Points Received: 2 of 2
Comments:
Question 4 Question :
. (TCO 6) To delete a file in VBScript, use the following command
(assuming fso is a Scripting.FileSystemObject) .
Student Answer: fso.FileDelete(Exists(“C:\Data\CustData.txt”)
fso.DeleteFile(Exists(“C:\Data\CustData.txt”)
fso.EraseFile(Exists(“C:\Data\CustData.txt”)
fso.FileErase(Exists(“C:\Data\CustData.txt”)
Instructor Instructor Explanation: See Chapter 12, Doc Sharing files, and the
Explanation: Week 6 Lecture
Points Received: 2 of 2
Comments:
Question 5 Question :
. (TCO 6) The following command opens a text file in VBScript.
Set file =
fso.OpenTextFile(“C:\Data\CustData.txt”, ?, ??, ???)
To create a new file if it doesn’t exist, the value of ??
must be .
Student Answer: the value of ?? must be 1
the value of ?? must be 2
This study source was downloaded by 100000845689434 from CourseHero.com on 05 -05-2022 11:33:57 GMT -05:00
https://www.coursehero.com/file/17498202/Comp-230-Quiz-Week-6/