Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
System Namespace
 Environment.SpecialFolder Enumerati...
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
Environment..::.SpecialFolder Enumeration

Updated: November 2007

Specifies enumerated constants used to retrieve directory paths to system special folders.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Visual Basic (Declaration)
<ComVisibleAttribute(True)> _
Public Enumeration SpecialFolder
Visual Basic (Usage)
Dim instance As Environment.SpecialFolder
C#
[ComVisibleAttribute(true)]
public enum SpecialFolder
Visual C++
[ComVisibleAttribute(true)]
public enum class SpecialFolder
J#
/** @attribute ComVisibleAttribute(true) */
public enum SpecialFolder
JScript
public enum SpecialFolder
Member nameDescription
ApplicationData The directory that serves as a common repository for application-specific data for the current roaming user.
CommonApplicationData The directory that serves as a common repository for application-specific data that is used by all users.
LocalApplicationData The directory that serves as a common repository for application-specific data that is used by the current, non-roaming user.
Cookies The directory that serves as a common repository for Internet cookies.
Desktop The logical Desktop rather than the physical file system location.
Favorites The directory that serves as a common repository for the user's favorite items.
History The directory that serves as a common repository for Internet history items.
InternetCache The directory that serves as a common repository for temporary Internet files.
Programs The directory that contains the user's program groups.
MyComputer The "My Computer" folder.
MyMusic The "My Music" folder.
MyPictures The "My Pictures" folder.
Recent The directory that contains the user's most recently used documents.
SendTo The directory that contains the Send To menu items.
StartMenu The directory that contains the Start menu items.
Startup The directory that corresponds to the user's Startup program group.
System The System directory.
Templates The directory that serves as a common repository for document templates.
DesktopDirectory The directory used to physically store file objects on the desktop.
Personal The directory that serves as a common repository for documents.
MyDocuments The "My Documents" folder.
ProgramFiles The program files directory.
CommonProgramFiles The directory for components that are shared across applications.

The system special folders are folders such as Program Files, Programs, System, or Startup, which contain common information. Special folders are set by default by the system, or explicitly by the user, when installing a version of Windows.

The GetFolderPath method returns the locations associated with this enumeration. The locations of these folders can have different values on different operating systems, the user can change some of the locations, and the locations are localized.

For more information about special folders, see the CSIDL values topic.

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0

XNA Framework

Supported in: 2.0, 1.0

Reference

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Unsupported folders      jstangroome   |   Edit   |  
This doesn't currently support querying for the SysWOW64 folder via CSIDL_SYSTEMx86 (0x29) or even FOLDERID_SystemX86 via the SHGetKnownFolderPath API in Vista. There are other special folders that aren't supported either, it will be interesting to see if this Enum gets extended or a new .NET wrapper altogether is provided.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker