OverviewExamples
Desktop_Folder = Shell.GetFolder(SHF_DESKTOP_COMMON);
Gets the path to the user's Desktop folder and stores the string in the variable "Desktop_Folder."
My_Docs = Shell.GetFolder(SHF_MYDOCUMENTS);
Gets the path to the user's "My Documents" folder and stores the string in the variable "My_Docs."
My_Docs = Shell.GetFolder(5);
Gets the path to the user's "My Documents" folder and stores the string in the variable "My_Docs." Example 2 used the SHF_MYDOCUMENTS constant, however this example shows that you can also use it's numeric value.
-- Get the path to the user's My Documents folder.
myDocs = Shell.GetFolder(SHF_MYDOCUMENTS);
-- Open the user's My Documents folder in an explore window.
File.ExploreFolder(myDocs, SW_SHOWNORMAL);
Gets the path to the user's "My Documents" folder and stores the string in the variable "myDocs." The folder is then opened in a explore window using the File.ExploreFolder action.
See also: Related Actions