ActivePatch Developer's Guide - Listing Package Files

Once a package has been created, an application may need to obtain information about each of the files in that package. The Package control has a Files property that returns a collection of PackageFile objects. The application can easily enumerate the objects in the control using this collection. For example:

' Print the name of each file in the package in the debug window

Package1.FileName = "update.pkg"
Package1.Password = "secret"

For nIndex = 0 To Package1.Files.Count – 1
    Debug.Print Package1.Files(nIndex).FileName
Next

Note that the collection is 0-based which means the collection's index begins with the number 0 (versus a 1-based collection). Another method to access the files in a package is to use a For Each..Next loop such as this:

Dim File As PackageFile

For Each File In Package1.Files
    Debug.Print File.FileName
Next