Learning About Computers and the Internet
Tips Blog WinXP Internet Computing Downloads Vista/7 Home

Constants for Special Folders in Windows
Certain folders that are generally present in Windows systems have been assigned constants for easier access by scripts. The constants are listed here.

There are a number of folders that are often accessed in system administration and for other purposes. These system or virtual folders are present on most Windows systems but not always with the same fully-qualified path. Thus it is convenient to have constants that can be used to represent the folder and its full pathname in scripts. In this way, standard system folders can be accessed without having to know the actual details of the exact configuration of a particular computer. The constants are given in the table below. Not all folders listed are present in every version of Windows. The Microsoft reference for these values is found here.

Special folder constants
Constant Special Folder


Internet Explorer




Control Panel


Printers and Faxes


My Documents






My Recent Documents




Recycle Bin


Start Menu


My Music


My Videos




My Computer


My Network Places








All Users Start Menu


All Users Programs


All Users Startup


All Users Desktop


Application Data




Local Settings\Application Data


All Users Favorites


Local Settings\ Temporary Internet Files




Local Settings\History


All Users Application Data






Program Files


My Pictures


User Profile


Common Files


All Users Templates


Administrative Tools


Network Connections

Example of using special folder constants in a script

One of the ways that the folder constants are used is with the Shell Object. Here is a very simple example: Set objShell = CreateObject("Shell.Application")
objShell.open objShell.NameSpace(&H11&)
This code snippet opens My Computer by using the constant &H11&

 < Previous ©2002-2016 Victor Laurie    Home page >>