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 |
|---|---|---|
|
|
0 |
The Windows or WinNT folder into which your operating system was installed |
|
|
1 |
The System folder into which libraries and device drivers are installed |
|
|
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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access