Windows Special folders

Source: Internet
Author: User

Reprint: http://www.xue163.com/124/6/1243914.html

1. Differences between directory and folders (folder)

The directory is the product of the DOS era, the DOS file system organizes the files in the form of a directory tree, and the files are all contained in the directory. The full name of any one file, consisting of "directory name + file name", the directory name is the "root directory + subdirectories + Multilevel subdirectory ..." consisting of the root directory is the letter with any 126 English letters plus a colon ":" to represent the letter, the directory is separated by a backslash "\" as the path delimiter; File name + extension ", extension with the period symbol". " At the beginning, the file name of the DOS era is 8.3 format, that is, the filename consists of 8 valid ASCII characters, with the extension by the period "." Start, followed by 3 valid ASCII characters. Therefore, the full path name of any one file begins with the root directory.

In the era of Windows, you have the concept of a folder. Each directory is a folder, and the drive letter is called a volume, and the volume is also a folder. The file name is divided into long file names and short filenames (8.3 format) two, and its notation is also distinguished, this is to be compatible with the 8.3 format, and enhance the representation of the file name. However, the full file name of the current version of Windows is limited to a maximum length of 260 characters, and the maximum length of the pathname representation is limited to 248 characters (note: Microsoft tried to break the path 260 character limit on the new operating system, part of Windows The SDK's extension library provides the so-called Bigpath). Importantly, the folder also allows the operator to understand the concepts of "desktop", "My Computer" (called "Computer" after NT 6.0), "My Network Place" (called "NT6.0"), "Control Panel", "Printer and fax", and yes, they are all folders.

To learn more about Windows Shell and folder programming, read Windows Shell namespace browsing.

2. Special folders

As previously mentioned, "desktop", "My Computer" or "Computer" are all folders. We can think of a lot of folders like this, which are special folders for Windows systems (SpecialFolder). Write them into the Windows API's special folder identifier list "CSIDL (constant special item ID list)", which has the following multiple:

public enum CSIDL
{
AdminTools = 0x30,
Altstartup = 0x1d,
APPDATA = 0x1a,
BitBucket = 10,
Cdburn_area = 0x3b,
Common_admintools = 0x2f,
Common_altstartup = 30,
Common_appdata = 0x23,
Common_desktopdirectory = 0x19,
Common_documents = 0x2e,
Common_favorites = 0x1f,
Common_music = 0x35,
Common_pictures = 0x36,
Common_programs = 0x17,
Common_startmenu = 0x16,
Common_startup = 0x18,
Common_templates = 0x2d,
Common_video = 0x37,
CONTROLS = 3,
COOKIES = 0x21,
DESKTOP = 0,
Desktopdirectory = 0x10,
DRIVES = 0x11,
FAVORITES = 6,
Flag_create = 0x8000,
FONTS = 20,
History = 0x22,
INTERNET = 1,
Internet_cache = 0x20,
Local_appdata = 0x1c,
MyDocuments = 12,
MyMusic = 13,
MyPictures = 0x27,
Myvideo = 14,
NetHood = 0x13,
NETWORK = 0x12,
PERSONAL = 5,
PRINTERS = 4,
PrintHood = 0x1b,
Profile = 40,
PROFILES = 0x3e,
Program_files = 0x26,
Program_files_common = 0x2b,
PROGRAMS = 2,
Recent = 8,
SENDTO = 9,
StartMenu = 11,
STARTUP = 7,
SYSTEM = 0x25,
TEMPLATES = 0x15,
WINDOWS = 0x24
}

When you write shell programs using Windows API functions, you can get the details of these folders with such enumerations or constants. Of course, I'm not here to explain how to write code, and here are some interesting things.

3. Special Folder identifiers

Before you read the article "magical Windows mysterious class identifier, {20d04fe0-3aea-1069-a2d8-08002b30309d}", I would like to enumerate a table of identifiers that represent a particular folder and its corresponding identifier.

<!--@page {margin:2cm} P {margin-bottom:0.21cm}--

Folder
Class identifier CLSID

My Computer (computer)
{20d04fe0-3aea-1069-a2d8-08002b30309d}

Control Panel
{21ec2020-3aea-1069-a2dd-08002b30309d}

Printers and Faxes
{2227a280-3aea-1069-a2de-08002b30309d}

Font
{d20ea4e1-3957-11d2-a40b-0c5020524152}

Scanners and Cameras
{E211B736-43FD-11D1-9EFB-0000F8757FCD}

Network connection
{7007acc7-3202-11d1-aad2-00805fc1270e}

Management tools
{d20ea4e1-3957-11d2-a40b-0c5020524153}

Scheduled Tasks
{D6277990-4C6A-11CF-8D87-00AA0060F5BF}

Web folder
{bdeadf00-c265-11d0-bced-00a0c90ab50f}

My Documents
{450d8fba-ad25-11d0-98a8-0800361b1103}

Recycling Station
{645ff040-5081-101b-9f08-00aa002f954e}

Network (workgroup)
{208d2c60-3aea-1069-a2d7-08002b30309d}

Internet Browser
{871c5380-42a0-1069-a2ea-08002b30309d}

Finding computer Results
{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}

Find File Results
{e17d4fc0-5564-11d1-83f2-00a0c90dc849}

Win7


Library
{031E4825-7B94-4DC3-B131-E946B44C8DD5}

Public
{4336a54d-038b-4685-ab02-99bb52d3fb8b}

Document
{450d8fba-ad25-11d0-98a8-0800361b1103}

Control Panel Home
{26ee0668-a00a-44d7-9371-beb064c98683}

Control Panel Start Page
{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}

User
{59031a47-3f72-44a7-89c5-5595fe6b30ee}

Recycling Station
{645ff040-5081-101b-9f08-00aa002f954e}

Search
{9343812e-1c37-4a49-a12e-4b2d810d956b}

Windows Media
{b416d21b-3b22-b6d4-bbd3-bbd452db3d5b}

Other users (HomeGroup)
{B4FB3F98-C1EA-428D-A78A-D1F5659CBA93}

Game
{ED228FDF-9EA8-4870-83B1-96B02CFE0D52}

Computers and devices
{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}

This is part of the system program file identifier (such as: My Computer, Recycle Bin ...). )》 。 If you are using the Windows XP operating system, you can use tools like "Resource Hacker" to see "reginst" Resources for "%windir%\system32\shell32.dll" to get those identifiers, such as.


(Point small image to see a larger image)
Click on the image to see a larger image

Another way to get an identifier is to look at the registry. Some of the commonly used identifiers can be found in this location:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace]


(Point small image to see a larger image)
Click on the image to see a larger image

4. Application of special folders

You may have been eager to read the magical Windows mysterious class identifier, {20d04fe0-3aea-1069-a2d8-08002b30309d}, and experimented with it. A simple description: If a folder has the special folder identifier listed earlier as the extension, this normal folder will have the function of a special folder. For example, create a new folder on the desktop and modify the common name to "computer." {20d04fe0-3aea-1069-a2d8-08002b30309d} ", you will get a special folder can be opened to my computer or computer, but not access to the original folder content, view its properties, you will see the full name of the folder.


(Point small image to see a larger image)
Click on the image to see a larger image

What do we need to remove the special logo? You can use the command prompt (win+r, enter cmd), enter the folder, or rename it, such as:


(Point small image to see a larger image)
Click on the image to see a larger image

You can use this method to create an Internet Explorer icon on the desktop (for XP systems, see: 5 solutions for desktop IE icons missing).
(Note: Due to Microsoft's defendant Windows operating system bundled with IE browser, after updating the operating system, the desktop custom icon has been removed from the IE browser option as shown in)


(Point small image to see a larger image)
Click on the image to see a larger image

5. In the Run dialog box and the Address bar

Wouldn't it be surprising if I said that these special folder identifiers could be applied to the Run dialog box (WIN+R) and the address bar of the explorer? Yes, it's true. Just precede the identifier with "::", for example, open the Recycle Bin, and enter ":: {645ff040-5081-101b-9f08-00aa002f954e}" in the Run dialog or address bar to confirm. And the Run dialog box supports more.


(Point small image to see a larger image)
Click on the image to see a larger image


(Point small image to see a larger image)
Click on the image to see a larger image

6. Resource Manager (Explorer.exe)

Explorer.exe is the default shell program for Windows, which is responsible for the interface display of the operating system. The Explorer, my Computer, the desktop, and the taskbar are all provided by this program, which is located in the Windows directory (%windir%) and you can find it by typing "Explorer/select,%windir%\explorer.exe" in the Run dialog box. Here is the function table that combines Explorer.exe and special folder identities to open folders, which we can use to run dialog boxes, or to write outside program calls when programmed.

Note: The form is excerpted from: "How to display Windows Explorer objects in one command-line", oyi319 has been translated.

Browse what? Command line
X is the target of the browse

Y is an optional sub-target
General Syntax:

Explorer [/n][/e][,/root],x,[[/select],y]

Comments:

Use/e will be displayed in the Explorer interface. That is, the folder pane appears on the left.
Use/n will be displayed in the "My Computer" interface. That is, the left side does not come out of the folder pane.
With the/root parameter, X is used as the root path. That is, when the X path is reached, the up action is not allowed.
If we do not use/root, the object x we are viewing is a sub-object, we can browse its ancestors or objects
Example:

Browse only the C: disk:
explorer/e,/root,c:

Explorer/root,%systemdrive%

Browse only the Windows directory:
explorer/e,/root,%windir%

Browse only the logon server (you can use a UNC path):
explorer/e,/root,%logonserver%

To browse only the current User Configuration path:
explorer/e,/root,%homedrive%%homepath%

Browse the System32 folder and check the Calc.exe program (Calc.exe is a calculator program):
Explorer/n,%windir%\system32,/select,%windir%\system32\calc.exe

My computer
explorer/e,:: {20d04fe0-3aea-1069-a2d8-08002b30309d}

Explanation: The CLSID of My computer: {20d04fe0-3aea-1069-a2d8-08002b30309d}

Control Panel
explorer/n,:: {20d04fe0-3aea-1069-a2d8-08002b30309d}\::{21ec2020-3aea-1069-a2dd-08002b30309d}

Explanation: The control Panel is a sub-object of my computer, and its CLSID is: {21ec2020-3aea-1069-a2dd-08002b30309d}.
 
Printers and Faxes
explorer/n,:: {20d04fe0-3aea-1069-a2d8-08002b30309d}\::{ 21ec2020-3aea-1069-a2dd-08002b30309d}\::{2227a280-3aea-1069-a2de-08002b30309d}
 
Font
explorer/n,: : {20d04fe0-3aea-1069-a2d8-08002b30309d}\::{21ec2020-3aea-1069-a2dd-08002b30309d}\::{ d20ea4e1-3957-11d2-a40b-0c5020524152}
 
Scanner and webcam
explorer/n,:: { 20d04fe0-3aea-1069-a2d8-08002b30309d}\::{21ec2020-3aea-1069-a2dd-08002b30309d}\::{ E211B736-43FD-11D1-9EFB-0000F8757FCD}

Note: Win7 invalid

Network Connection explorer/n,:: {20d04fe0-3aea-1069-a2d8-08002b30309d}\::{21ec2020-3aea-1069-a2dd-08002b30309d}\::{ 7007ACC7-3202-11D1-AAD2-00805FC1270E}

Management Tools explorer/n,:: {20d04fe0-3aea-1069-a2d8-08002b30309d}\::{21ec2020-3aea-1069-a2dd-08002b30309d}\::{ d20ea4e1-3957-11d2-a40b-0c5020524153}

Scheduled Tasks
explorer/n,:: {20d04fe0-3aea-1069-a2d8-08002b30309d}\::{21ec2020-3aea-1069-a2dd-08002b30309d}\::{ D6277990-4C6A-11CF-8D87-00AA0060F5BF}

Note: Win7 invalid

Web Folder explorer/n,:: {20d04fe0-3aea-1069-a2d8-08002b30309d}\::{bdeadf00-c265-11d0-bced-00a0c90ab50f}

Note: Win7 invalid

My document explorer/n,:: {450d8fba-ad25-11d0-98a8-0800361b1103}

Recycle Bin explorer/n,:: {645ff040-5081-101b-9f08-00aa002f954e}

Network (Network Collection) explorer/n,:: {208d2c60-3aea-1069-a2d7-08002b30309d}

Default browser (IE)
explorer/n,:: {871c5380-42a0-1069-a2ea-08002b30309d}

Find Files
explorer/n,:: {1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}

Note: Win7 invalid

Find a computer
explorer/n,:: {e17d4fc0-5564-11d1-83f2-00a0c90dc849}

Note: Win7 invalid

This article is from the Chinese Learning Network [http://www.xue163.com] original link: http://www.xue163.com/124/6/1243914.html

Windows Special folders

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.