FileSystemObject Object
The FileSystemObject object is the top-level object through which all access to a file system occurs. Table 19.6 lists its single collection, while Table 19.7 lists its methods. Note that many of these methods are only parsing functions and have no real correlation with the underlying file system.
Table 19.6. FileSystemObject Object Collections
|
Property |
Description |
|---|---|
|
Drives |
Returns the Drives collection containing all the drives accessible through the current FileSystemObject. |
Table 19.7. FileSystemObject Object Methods
|
Method |
Description |
|---|---|
|
BuildPath |
Appends a folder name or a relative path to a path. For example, you could append the folder name Documents to the path C:\MyStuff\Personal. The result would be C:\MyStuff\Personal\Documents. The extra backslash is automatically provided, if necessary. |
|
CopyFile |
Copies a file from one location to another. This method is similar to the File object's Copy method, but no File object is required. |
|
CopyFolder |
Copies a folder and all its contents from one location to another. |
|
CreateFolder* |
Creates a new folder. |
|
CreateTextFile |
Creates a new text file. |
|
DeleteFile |
Deletes a specific file. This method is similar to the File object's Delete method, but no File object is required. |
|
DeleteFolder |
Deletes a folder and all its contents. |
|
DriveExists |
Determines whether a specific drive exists on your machine. It does not, however, guarantee that the drive is available. |
|
FileExists |
Determines whether the ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access