APGen Documentation Previous Topic: Output.Dir Next Topic: Output.Append Parent Topic: Output Object    Output Object
Output.Path
See Also:

The Output.Path property sets/returns the complete path of the output file.

Syntax

VBScript:

Output.Path [= strPath]

JScript:

Output.Path [= strPath];

Parameters

strPath A string indicating the path of the output file.  Relative or absolute paths may be used.

Notes

When setting the Path property, the strPath parameter may be an absolute path or a relative path.  Relative paths are resolved using the previous Output.Path value.  The Filename and Dir values are adjusted to match the new path.

When reading the Path property, the complete path is returned.

When using the "//computer/share/" path format to write to a network share, make sure that the logged on user has write access to the share.  The Output.Logon object can be used to set the user account used for opening/creating the output file.

The Path value is a combination of the Dir value and the Filename value.  When Output.Open() is called, the Path value is used to determine the location of the output file.

The initial, default value for Output.Path is the path of the root script, with the file extension (usually .apg) replaced with .htm.  For scripts run using programmatic execution, this default directory can be changed by setting the APGen.OutputDir property.

Changing the value of the Path property after an output stream has been opened closes the stream.  New content will be sent to the file specified by the new Path value.

Example

The following example shows proper use of the Output.Path property:

<%#
Output.Path = "C:\temp\test.htm"
#%>

<HTML><BODY>
<UL>Output object properties:
     <LI>Output.Filename:
<%#= Output.Filename#%>
     <LI>Output.Dir:
<%#= Output.Dir#%>
     <LI>Output.Path:
<%#= Output.Path#%>
</BODY></HTML>

Running this script creates the following file (C:\temp\test.htm):



<HTML><BODY>
<UL>Output object properties:
     <LI>Output.Filename: test.htm
     <LI>Output.Dir: C:\temp\
     <LI>Output.Path: C:\temp\test.htm
</BODY></HTML>

Applies To

Output Object