Files

JScript3.0+Syntax

Core JScript Collection of File objects.

Description

The Files object represents a collection of files in a folder. The Files object has specific properties and methods associated with it, which are shown in Table 9.12.

Table 9.12. Properties and Methods of the Files Object
Property/MethodDescription
CountReturns the number of items in a collection
ItemSets or returns an item based on a specific key

Example

Listing 9.66 shows how to create a new Files object.

Listing 9.66 Example of Files Object
 <html> <body> <script language="JScript"> <!-- Hide // function displays a list of the files // in the specified folder. function ShowList(foldername) { var myObject, f, MyFiles, names; // Create an instance of the FileSystemObject ...

Get Pure JavaScript 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.