APGen Documentation Previous Topic: Output.Stream Next Topic: Output.Buffer Parent Topic: Output Object    Output Object
Output.CanCreateDirs
See Also:

The Output.CanCreateDirs property sets/returns whether directories containing the output file can be created if they do not already exist.

Syntax

VBScript:

Output.CanCreateDirs [= boolVal]

JScript:

Output.CanCreateDirs [= boolVal];

Parameters

boolVal True: Create the directories containing the output file, if necessary.
False (Default): Output.Open() will fail if the Output.Dir directory doesn't exist.

Notes

The CanCreateDirs value is used when Output.Open() opens the output stream.  If CanCreateDirs is True, the directory specified by Output.Dir will be created if it does not already exist.  All parent directories of Output.Dir will also be created, as necessary.

Example

The following example creates a bunch of directories and a single output file:

<%#
Output.CanCreateDirs = True
Output.Path = "c:\temp\t1\t2\t3\t4\hello.txt"
Output.Write "Hello There!"
#%>

Applies To

Output Object