Name
FileSystemObject Object
Createable
Yes
Library
Microsoft Scripting Runtime
Description
The FileSystemObject object is at the top level of the File
System object model and is the only externally createable object in
the hierarchy; that is, it’s the only object you can create using
the CreateObject function or the host object model’s object creation
facilities. For example, the following code instantiates a
FileSystemObject object named oFS:
Dim oFS
Set oFS = CreateObject("Scripting.FileSystemObject")The FileSystemObject object represents the host computer’s filesystem as a whole. Its members allow you to begin navigation into the filesystem, as well as to access a variety of common filesystem services. For information about the FileSystemObject object’s properties and methods, see the entry for each property and method.
For an overview of the file system object model, see the “File System Object Model” entry.
Properties
Drives (returns a Drives collection object).
Methods
BuildPath | FileExists | GetFileName |
CopyFile | FolderExists | GetFolder |
CopyFolder | GetAbsolutePathName | GetParentFolderName |
CreateFolder | GetBaseName | GetSpecialFolderd |
CreateTextFile | GetDrive | GetTempName |
DeleteFile | GetDriveName | MoveFile |
DeleteFolder | GetExtensionName | MoveFolder |
DriveExists | GetFile | OpenTextFile |
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