Computer Science > EXAM > Comp 230 Quiz Week 6 (GRADED A) Questions and And Answer solutions | ALL CORRECT (All)

Comp 230 Quiz Week 6 (GRADED A) Questions and And Answer solutions | ALL CORRECT

Document Content and Description Below

Comp 230 Quiz Week 6 1. Question : (TCO 6) What WSH object is used for VBScript File I/O? Student Answer: Scripting.FileSystemObject FileSystemObject Scripting.FileSystem WScript.FileSystem... Object Instructor Explanation: Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 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 Explanation: Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 6 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 Answer: fso.MoveFile(“C:\Data\CustData.txt”,”C:\BackUp\CustData.txt”) 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 Explanation: Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 6 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 Explanation: Instructor Explanation: See Chapter 12, Doc Sharing files, and the 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 the value of ?? must be false the value of ?? must be true Instructor Explanation: Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 6 Lecture Points Received: 2 of 2 Comments: Question 6 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 writing, the value of ? must be . Student Answer: the value of ? must be 1 the value of ? must be 2 the value of ? must be true the value of ? must be false Instructor Explanation: Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 6 Lecture Points Received: 2 of 2 Comments: Question 7 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 Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week Explanation: 6 Lecture Points Received: 2 of 2 Comments: Question 8 Question : . (TCO 6) To complete the Read, Write, or Append operation in VBScript, use the following method (assuming fileObj is a file object created with CreateTextFile( ) or OpenTextFile) . Student Answer: fileObj.Exit fileObj.End fileObj.Next fileObj.Close Instructor Explanation: Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 6 Lecture Points Received: 2 of 2 Comments: Question 9 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(folderName) Then If fso.FolderExists(folderName) Then If fso.FolderNotFound(folderName) Then If fso.FolderFound(folderName) Then Instructor Explanation: Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 6 Lecture Points Received: 2 of 2 Comments: Question 10 Question : . (TCO 6) To delete a folder in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) . Student Answer: fso.FolderDelete(folderName) fso.DeleteFolder(folderName) fso.EraseFolder(folderName ) fso.FolderErase(folderName) Instructor Explanation: Instructor Explanation: See Chapter 12, Doc Sharing files, and the Week 6 Lecture Points Received: 2 of 2 Comments: [Show More]

Last updated: 2 years ago

Preview 1 out of 5 pages

Buy Now

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

We Accept

Reviews( 0 )

$11.00

Buy Now

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

93
0

Document information


Connected school, study & course


About the document


Uploaded On

May 05, 2022

Number of pages

5

Written in

Seller


seller-icon
Goodluck Academia

Member since 4 years

165 Documents Sold

Reviews Received
46
9
10
4
9
Additional information

This document has been written for:

Uploaded

May 05, 2022

Downloads

 0

Views

 93

Document Keyword Tags

More From Goodluck Academia

View all Goodluck Academia's documents »

Recommended For You

Get more on EXAM »

$11.00
What is Scholarfriends

In Scholarfriends, 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 are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·