O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

FileSystemObject.GetStandardStream Method

Syntax

                  oFileSys.GetStandardStream(StandardStreamType, [Unicode])
oFileSys

Use: Required

Data Type: FileSystemObject object

A reference to the FileSystemObject object.

StandardStreamType

Use: Required

Data Type: Long

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

Unicode

Use: Optional

Data Type: 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 parameter can be either Unicode (True) or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required