Share via


FileSystemObject

Microsoft® Windows® 2000 Scripting Guide

As the name implies, the FileSystemObject (FSO) is designed to help you manage the file system. The FileSystemObject allows you to retrieve information about essential file system elements, including disk drives, folders, and files; it also includes methods that allow you to perform common administrative tasks, such as copying, deleting, and moving files and folders. In addition, the FileSystemObject enables you to read from and write to text files.

It is worth noting that the name FileSystemObject is a bit of a misnomer, simply because the FileSystemObject actually includes a number of objects, each designed for a specific purpose. The individual objects that make up the FileSystemObject are listed in Table 4.1.

Table 4.1 Objects That Make Up the FileSystemObject

Object

Description

Drive

Represents a drive or collection of drives on the system.

File

Represents a file or collection of files in the file system.

Folder

Represents a folder or collection of folders in the file system.

TextStream

Represents a stream of text that is read from, written to, or appended to a text file.

Each of these objects will be examined in detail in this chapter.