1 which line will properly create the object for vbscript


1. Which line will properly create the object for VBScript File I/O?

  • Set fso = Scripting.FileSystemObject
  • fso = CreateObject("Scripting.FileSystem")
  • Set fso = CreateObject("Scripting.FileSystemObject")
  • Set fso = CreateObject("WScript.FileSystemObject")

2. To create a new file in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) _____.

  • file = fso.CreateTextFile("C:DataCustData.txt")
  • Set file = fso.CreateFile("C:DataCustData.txt")
  • file = fso.CreateFile("C:DataCustData.txt")
  • Set file = fso.CreateTextFile("C:DataCustData.txt")

3. To copy the file C:DataCustData.txt to C:BackUpCustData.txt in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) _____.

  • fso.FileCopy("C:DataCustData.txt","C:BackUpCustData.txt")
  • fso.FileCopy("C:BackUpCustData.txt", "C:DataCustData.txt")
  • fso.CopyFile("C:DataCustData.txt","C:BackUpCustData.txt")
  • fso.CopyFile("C:BackUpCustData.txt", "C:DataCustData.txt")

4. (TCO 6) To move the file C:DataCustData.txt to C:BackUpCustData.txt in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) _____.

  • fso.MoveFile("C:DataCustData.txt","C:BackUpCustData.txt")
  • fso.MoveFile("C:BackUpCustData.txt", "C:DataCustData.txt")
  • fso.FileMove("C:DataCustData.txt","C:BackUpCustData.txt")
  • fso.FileMove("C:BackUpCustData.txt", "C:DataCustData.txt")

5. The following command opens a text file in VBScript.

Set file = fso.OpenTextFile("C:DataCustData.txt", ?, ??, ???)

To open a file for writing, the value of ? must be _____.

  • the value of ? must be 1
  • the value of ? must be 2
  • the value of ? must be true
  • the value of ? must be false

6. The following command opens a text file in VBScript. Set file = fso.OpenTextFile("C:DataCustData.txt", ?, ??, ???) To create a new file if it doesn't exist, the value of ?? must be _____.

  • the value of ?? must be 1
  • the value of ?? must be 2
  • the value of ?? must be false
  • the value of ?? must be true

7. The following command opens a text file in VBScript. Set file = fso.OpenTextFile("C:DataCustData.txt", ?, ??, ???) To read data from this file, which condition will test to make we are not at the end of the line of text?

  • While NOT file.EndOfLine
  • While NOT file.AtEndOfFile
  • While NOT file.EndOfFile
  • While NOT file.AtEndOfLine

8. 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) _____.

  • fileObj.Exit
  • fileObj.End
  • fileObj.Next
  • fileObj.Close

9. 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.Skip(3)
  • fileObj.Ignore(3)
  • fileObj.Move(3)

10. 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.FolderCreated(folderName) Then
  • If fso.FolderExists(folderName) Then
  • If fso.FolderNotFound(folderName) Then
  • If fso.FolderFound(folderName) Then

Solution Preview :

Prepared by a verified Expert
Macroeconomics: 1 which line will properly create the object for vbscript
Reference No:- TGS01469802

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)