[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6575
  • Last Modified:

Redirect WScript.Echo Output

New to scripting, how can I redirect the output from a message box to a file?  The following code displays a message box for each element of the array.  I'd like to capture it in a file.

WScript.Echo "Members:"
For Each strMember in arrMemberOf
  WScript.Echo strMember
Next

Thank you
0
MariaHalt
Asked:
MariaHalt
1 Solution
 
nayernaguibCommented:
You can use these lines in order to write to a text file:

_______________________________________________

  Set fso = CreateObject("Scripting.FileSystemObject")
  Set file = fso.CreateTextFile("c:\newfile.txt", True)
  file.WriteLine whatever

_______________________________________________

Replace "whatever" with any text you want to write!
_______________

  Nayer Naguib
0
 
MariaHaltAuthor Commented:
Perfect!  Thank you!!!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now