O'Reilly logo

Insider Power Techniques for Microsoft® Windows® XP by Austin Wilson, Scott Andersen, Geoff Winslow, Paul McFedries

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

Programming the VBScript FileSystemObject

One of the most powerful uses for scripted Automation is accessing the object models exposed by the VBScript engine, particularly the FileSystemObject that gives you access to the local file system. This enables you to create scripts that work with files, folders, and disk drives; read and write text files; and more. You use the following syntax to refer to this object:

Scripting.FileSystemObject

For all your file system scripts, you begin by creating a new instance of FileSystemObject:

Set objFS = WScript.CreateObject("Scripting.FileSystemObject")

Here’s a summary of the file system objects you can access via this Automation object:

  • Drive. This object enables you to access the properties of a specified disk ...

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