APGen Documentation Previous Topic: Output.Open() Next Topic: Script Object Parent Topic: Output Object    Output Object
Output.Close()
See Also:

The Output.Close() method closes the output stream.

Syntax

VBScript:

Output.Close

JScript:

Output.Close();

Notes

There are two methods to open the output stream (Open() and setting the Stream property).  Close() is the only method to close the stream.

Output.Close() is implicitly called if the output file path is changed using the Filename, Dir, or Path properties.

If content is generated after Output.Close() is called, the output stream will be reopened using Output.Open(), as described in the Output.Open() documentation.

Example

The following example creates two text files.  The Output.Close() call is unnecessary, since changing the output file path implicitly closes the output stream.

<%#
Output.Filename = "foo.txt"
Output.Write "FooBar"

' Close the current output file, so we can create a new one.
' (This call is unnecessary.)
Output.Close

Output.Filename = "hello.txt"
Output.Write "Hello World!"
#%>

Applies To

Output Object