VBScript » FileSystemObject » GetSpecialFolder

Version: 2.0

Syntax:
object.GetSpecialFolder (folderid)

Returns the path to one of the special folders - \Windows, \System or \TMP.

This method is used to get the path for one of Windows' special folders. These folders are:

0 - WindowsFolder, containing the files installed by the operating system.

1 - SystemFolder, containing fonts, libraries and device drivers required by the operating system.

2 - TemporaryFolder, used to store temporary (.TMP) files.

Examples

Code:
<%
dim filesys, f
Set filesys = CreateObject("Scripting.FileSystemObject")
Set f = filesys.GetSpecialFolder(1)
Response.Write ("The path to your System folder is '" f "'." )
%>
Output:
"The path to your System folder is 'C:\WINNT\system32'."