Computer Science > EXAM > COMP 230 Week 6 Quiz | 30 out of 30 | Download To Score An A (All)
COMP 230 Week 6 Quiz 1. Question : (TCO 6) When you create a VBScript Scripting.FileSystemObject, you must start the code line with . Student Answer: Let fso = CreateObject Set fso = Crea... teObject Let fso = GetObject Set fso = GetObject Instructor Explanation: See Chapters 8 and 9 and the Week 6 Lecture. Question 2. Question : (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) . Student Answer: If fso.FileCreated(file) Then If fso.FileExists(file) Then If fso.FileNotFound(file) Then If fso.FileFound(file) Then Instructor Explanation: See Chapters 8 and 9 and the Week 6 Lecture. Question 3 . Question : (TCO 6) To Copy the file C:\Data\CustData.txt to C:\BackUp\CustData.txt in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) . Student Answer: fso.FileCopy(“C:\Data\C ustData.txt”,”C:\BackUp\ CustData.txt”) fso.FileCopy(”C:\BackUp \CustData.txt”, “C:\Data\CustData.txt”) fso.CopyFile(“C:\Data\C ustData.txt”,”C:\BackUp\ CustData.txt”) fso.CopyFile(”C:\BackUp \CustData.txt”, “C:\Data\CustData.txt”) Instructor Explanation: See Chapters 8 and 9 and the Week 6 Lecture. Question 4 . Question : (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 . Student Answer: The value of ? must be 1 The value of ? must be 2 The value of ? must be 8 The value of ? must be True Instructor Explanation: See Chapters 8 and 9 and the Week 6 Lecture. Question 5. Question : (TCO 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 Unicode, the value of ??? must be . Student Answer: The value of ??? must be 0 The value of ??? must be -1 The value of ??? must be 2 The value of ??? must be -2 Instructor Explanation: See Chapters 8 and 9 and the Week 6 Lecture. Question 6 . Question : (TCO 6) To test to see if a directory (or folder) exists before you write data to it in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) . Student Answer: If fso.FolderCreated(folder Name) Then If fso.FolderExists(folderN ame) Then If fso.FolderNotFound(fold erName) Then If fso.FolderFound(folderN ame) Then Instructor Explanation: See Chapters 8 and 9 and the Week 6 Lecture. [Show More]
Last updated: 1 year ago
Preview 1 out of 4 pages
Instant download
Instant download
Connected school, study & course
About the document
Uploaded On
May 05, 2022
Number of pages
4
Written in
This document has been written for:
Uploaded
May 05, 2022
Downloads
0
Views
60
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·