O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required