Chapter 19. File Access Component

In addition to the native ASP objects (Request, Response, etc.) and the various installable components (Ad Rotator, Browser Capabilities, etc.), you also have access to a third group of objects. These objects are instantiated directly from the Microsoft Scripting Runtime DLL (scrrun.dll ). This DLL contains functionality that is neither in the native ASP objects nor in the VBScript runtime (vbscript.dll ) itself. From the scripting DLL, you can instantiate objects that provide your application with extensive file-manipulation capabilities. (From this DLL, you also can create a Dictionary object that provides you with a way to perform collection-type functions without true collections.)

All file manipulation is performed by the FileSystemObject object. Your application will have only one of these, and it represents your application's "window" onto the system's file structures. With this object, you are able to perform some simple functions such as opening and closing files, but the real strength of this object is that through it you are able to instantiate the other file manipulation objects: Drive, Folder, and File. Through these objects, your application has almost all the power over the file system that you have through a command-line interface.

Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.