The filesystemobject|fso| constant FileSystemObject has a number of valuable constants that can be used in program code. The advantage of constants is that we can easily use certain values without remembering their specific values. Constants also make the program more maintainable if the value of the constant can change.
On some scripting hosts, these constants are already defined. In this case, it is OK to use the constants directly in the code where the values are needed. However, if Scrrun. DLLs are not explicitly referenced by the scripting host, you need to define them before using constants. Examples of this include Microsoft Internet Explorer and Microsoft Internet Information Services (IIS).
The following list describes the different types of constants provided for FileSystemObject, each of which provides a brief description:
DRIVETYPE constant
Defines the various drive types that can be used on the host, such as Fixed, removable, CD-ROM, and so on.
File attribute Constants
Various file attributes, such as Hidden, read-only, etc., are defined.
File input/Output constants
Defines constants for file input and output.
SPECIALFOLDER constant
Defines the special folders that can be used in the operating system.
These constants have their own definition values, and in the example below we can see how they are used.