FileSystemObject Constants

Office VBScript

Microsoft® Visual Basic® Scripting Edition FileSystemObject Constants  Scripting Run-Time Reference 
Version 2 

See Also



FileSystemObject has a number of useful constants that you can use in your code. Constants provide a convenient way to use specific values without actually having to remember the value itself. They also makes your code more maintainable, should the value of any constant ever change.

Depending on your scripting host, these constants may be already defined. If so, simply use the constants anywhere in your code in place of the values they represent. In cases where SCRRUN.DLL is not explicitly referenced by your scripting host, you'll have to define these constants in your code before you can use them. Examples of this case include Microsoft Internet Explorer and Microsoft Internet Information Services (IIS).

The following list describes the various categories of constants provided for the FileSystemObject, along with a brief description:

DriveType Constants
Defines the various drive types available on the host computer, such as Fixed, Removable, CD-ROM, etc.

File Attribute Constants
Defines various file attributes such as Hidden, Read-Only, etc.

File Input/Output Constants
Defines constants used with file input and output.

SpecialFolder Constants
Defines special folders available in your operating system.