GetFolderPath¶
Gets the path to the system special folder that is identified by the specified enumeration.
Outputs¶
Path (Type: string)¶
The path to the specified system special folder, if that folder physically exists on your computer; otherwise, an empty string (“”).
Comments¶
The following folders can be identified:
| folder | description |
|---|---|
| ApplicationData | The directory that serves as a common repository for application-specific data for the current roaming user. A roaming user works on more than one computer on a network. A roaming user’s profile is kept on a server on the network and is loaded onto a system when the user logs on. |
| CommonApplicationData | The directory that serves as a common repository for application-specific data that is used by all users. |
| CommonDesktopDirectory | The file system directory that contains files and folders that appear on the desktop for all users. |
| CommonDocuments | The file system directory that contains documents that are common to all users. |
| CommonMusic | The file system directory that serves as a repository for music files common to all users. |
| CommonPictures | The file system directory that serves as a repository for image files common to all users. |
| CommonProgramFiles | The directory for components that are shared across applications.To get the x86 common program files directory on a non-x86 system, use the ProgramFilesX86 member. |
| CommonProgramFilesX86 | The Program Files folder. |
| CommonVideos | The file system directory that serves as a repository for video files common to all users. |
| Cookies | The directory that serves as a common repository for Internet cookies. |
| Desktop | The logical Desktop rather than the physical file system location. |
| DesktopDirectory | The directory used to physically store file objects on the desktop. |
| Favorites | The directory that serves as a common repository for the user’s favorite items. |
| LocalApplicationData | The directory that serves as a common repository for application-specific data that is used by the current, non-roaming user. |
| LocalnVisionApplicationData | The directory where nVision stores local data. |
| MyDocuments | The My Documents folder. This member is equivalent to Personal. |
| MyMusic | The My Music folder. |
| MyPictures | The My Pictures folder. |
| MyVideos | The file system directory that serves as a repository for videos that belong to a user. |
| Personal | The directory that serves as a common repository for documents. This member is equivalent to MyDocuments. |
| Pipeline | The directory where the pipeline is located. |
| ProgramFiles | The program files directory.On a non-x86 system, passing ProgramFiles to the GetFolderPath method returns the path for non-x86 programs. To get the x86 program files directory on a non-x86 system, use the ProgramFilesX86 member. |
| ProgramFilesX86 | The Program Files folder. On an x86 system, passing the ProgramFilesX86 member to the Environment.GetFolderPath method returns String.Empty; use the ProgramFiles member instead. You can determine whether Windows is a 32-bit operating system by calling the Environment.Is64BitOperatingSystem property. |
| Programs | The directory that contains the user’s program groups. |
| Recent | The directory that contains the user’s most recently used documents. |
| System | The System directory. |
| SystemX86 | The Windows System folder. Added in the .NET Framework 4. |
| Windows | The Windows directory or SYSROOT. This corresponds to the %windir% or %SYSTEMROOT% environment variables. |