ASP GetSpecialFolderMethod


FileSystemObject 对象参考手册Complete FileSystemObject Object Reference

The GetSpecialFolder method returns the path of a special folder in Windows.

Syntax

FileSystemObject.GetSpecialFolder(foldername)

Parameters Description
foldername Required. The folder to return.
0=WindowsFolder - Contains files installed by the Windows operating system.
1=SystemFolder - Contains libraries, fonts, and device drivers.
2=TemporaryFolder - Used to store temporary files.


Example

<%
dim fs,p
set fs=Server.CreateObject("Scripting.FileSystemObject")
set p=fs.GetSpecialFolder(1)
Response.Write(p)
set p=nothing
set fs=nothing
%>

Output:

C:\WINNT\system32


FileSystemObject 对象参考手册Complete FileSystemObject Object Reference Other Extensions