Name

GetSpecialFolder (FileSystemObject Object) — fsoObj.GetSpecialFolder ( intSpecialFolderType )

Synopsis

Retrieves the full physical path of a special folder on the web server.

Parameters

intSpecialFolderType

An integer that represents the type of special folder whose full physical path you wish to retrieve. The possible values for this parameter are as follows:

Constant

Value

Description

WindowsFolder

0

The Windows or WinNT folder into which your operating system was installed

SystemFolder

1

The System folder into which libraries and device drivers are installed

TemporaryFolder

2

The Temp folder as it is declared in the environment variables

Example

<%

' Dimension local variables. 
Dim fsoObject   ' FileSystemObject
' Declare file constants.
Const WindowsFolder   = 0
Const SystemFolder    = 1
Const TemporaryFolder = 2

' Instantiate the FileSystemObject variable.
Set fsoObject = Server.CreateObject( _
                "Scripting.FileSystemObject")
' Use GetSpecialFolder to retrieve the physical path
' for the Windows, System, and Temp directories. 
' This example returns something similar to "C:\WINNT". 
fsoObject.GetSpecialFolder(WindowsFolder)
' This example returns something similar to 
' "C:\WINNT\SYSTEM32". 
fsoObject.GetSpecialFolder(SystemFolder)

' This example returns something similar to 
' "C:\WINNT\TEMP" 
fsoObject.GetSpecialFolder(TemporaryFolder)
. . . [additional code]

%>

Notes

Note that you must explicitly declare constants for use with the file access components.

Get ASP in a Nutshell, 2nd Edition 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.