Files Collection

Properties   Methods   See Also

A collection of file objects in a project.

Syntax

Files

Remarks

The files collection consists of all the files in a project. Each file is an object that can be manipulated with the file object properties and methods.

Files in a file collection can be referenced by index number or name. For example, the following code opens the file that was first added to a project:

_VFP.ActiveProject.Files(1).Modify( )

The following code opens an editing window for Main.prg:

_VFP.ActiveProject.Files('Main.prg').Modify( )

Note that it isn’t necessary to include the path with a file name.

For more information about the files collection and projects, see Project Manager Hooks in Chapter 32, “Application Development and Developer Productivity,” of the Programmer's Guide.