Name

FileSystemObject.GetStandardStream Method

Syntax

                  oFileSys.GetStandardStream(StandardStreamType, [Unicode])
oFileSys

Use: Required

Data Subtype: FileSystemObject object

A reference to the FileSystemObject object.

StandardStreamType

Use: Required

Data Subtype: Long

A constant indicating which standard stream (input, output, or error) should be returned by the function.

Unicode

Use: Optional

Data Subtype: Boolean

A Boolean indicating whether the stream should be Unicode or ASCII.

Return Value

A TextStream object.

Description

Allows you to read from the standard input stream and write to the standard output or standard error streams.

Rules at a Glance

  • StandardStreamType can be one of the following constants defined in the Scripting Runtime type library:

    Constant

    Value

    Description

    StdIn

    0

    Standard input

    StdOut

    1

    Standard output

    StdErr

    2

    Standard error

  • The Scripting Runtime type library defines constants of the StandardStreamTypes enumeration that can be used in place of their numeric equivalents for the StandardStreamType argument. You can use them in your scripts in either of two ways. You can define the constants yourself by adding the following code to your script:

    Const StdIn = 0
    Const StdOut = 1
    Const StdErr = 2

    You can also include an ASP METADATA tag in the global.asa file or the following line in a Windows Script Host (.wsf ) file in order to access the constants from the Scripting Runtime type library:

    <reference GUID="{420B2830-E718-11CF-893D-00A0C9054228}" />
  • The Unicode ...

Get VBScript in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.