• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 8 pages
Exam (elaborations)

Comp 230 Wk 6 Quiz Devry

Document preview thumbnail
Preview 2 out of 8 pages

Comp 230 Wk 6 Quiz Devry a Question 1 2 / 2 pts (TCO 6) Which line will properly create the object for VBScript File I/O? Correct! Set fso = CreateObject(“Scripting.FileSystemObject”) Set fso = CreateObject(“WScript.FileSystemObject”) Set fso = Scripting.FileSystemObject fso = CreateObject(“Scripting.FileSystem”) Question 2 0 / 2 pts (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) _____. If fso.FileFound(file) Then If fso.FileCreated(file) Then You Answered If fso.FileNotFound(file) Then Correct Answer If fso.FileExists(file) Then Question 3 2 / 2 pts (TCO 6) To copy the file C:DataCustD to C:BackUpCustD in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) _____. fso.FileCopy(”C:BackUpCustD”, “C:DataCustD”) fso.CopyFile(”C:BackUpCustD”, “C:DataCustD”) fso.FileCopy(“C:DataCustD”,”C:BackUpCustD”) Correct! fso.CopyFile(“C:DataCustD”,”C:BackUpCustD”) Question 4 2 / 2 pts (TCO 6) To delete a file in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) _____. Correct! fso.DeleteFile(Exists(“C:DataCustD”) fso.EraseFile(Exists(“C:DataCustD”) fso.FileErase(Exists(“C:DataCustD”) fso.FileDelete(Exists(“C:DataCustD”) Question 5 2 / 2 pts (TCO 6) The following command opens a text file in VBScript. Set file = fso.OpenTextFile(“C:DataCustD”, ?, ??, ???) To open a file for reading, the value of ? must be _____. the value of ? must be 2 the value of ? must be false the value of ? must be true Correct! the value of ? must be 1 Question 6 2 / 2 pts (TCO 6) The following command opens a text file in VBScript. Set file = fso.OpenTextFile(“C:DataCustD”, ?, ??, ???) To open a file for writing, the value of ? must be _____. Correct! the value of ? must be 2 the value of ? must be true the value of ? must be 1 the value of ? must be false Question 7 0 / 2 pts (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) _____. Correct Answer fileStr = fileObj.ReadAll You Answered fileObj.Read(fileStr) fileStr = fileObj.Read fileObj.ReadAll(fileStr) Question 8 2 / 2 pts (TCO 6) The following command opens a text file in VBScript. Set file = fso.OpenTextFile(“C:DataCustD”, ?, ??, ???) To ensure that the file is formatted as ASCII instead of Unicode, the value of ??? must be _____. Correct! the value of ??? must be 0 the value of ??? must be 2 the value of ??? must be -1 the value of ??? must be -2 Question 9 2 / 2 pts (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) _____. If fso.FolderNotFound(folderName) Then If fso.FolderFound(folderName) Then Correct! If fso.FolderExists(folderName) Then If fso.FolderCreated(folderName) Then Question 10 2 / 2 pts (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) _____. fileObj.Bypass(3) fileObj.Move(3) fileObj.Ignore(3) Correct! fileObj.Skip(3) Quiz Score: 16 out of 20 Previous


Document information

Uploaded on
January 9, 2021
Number of pages
8
Written in
2020/2021
Type
Exam (elaborations)
Contains
Questions & answers
$8.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
StudySet
3.9
(657)
Sold
2848
Followers
1752
Items
20817
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.