The compareObjects script

The compareObjects script lets you compare two export packages for differences. You can either compare the entire set of objects in the two packages, or compare one object in a package to a corresponding object in the other package.

Usage

compareObjects [option] pkg1 pkg2 [[-t type] ObjectId1 [ObjectId2]]

Element Required? Description
[option] No

Specify an option:

-a
Show all objects in both packages whether or not a difference exists.
-h
Shows the script usage help text.

pkg1

pkg2

Yes

Specify the compressed ZIP file from which you want to compare objects. If you specify two file names without specifying ObjectId1 or ObjectId2, all objects in the two ZIP files are compared.

-t type No

Specify the object type; this specifier is relevant only if you specify ObjectId1 and/or ObjectId2. If you do not specify an object type, JobType is the default.

ObjectId1

ObjectId2

No Specify the name, or names, of the objects to be compared. If ObjectId2 is not specified, the same name is used for both objects.

In the output of the script, each line begins with a character that specifies the type of change:

  • + An element is in pkg2 and not in pkg1.
  • - An element is in pkg1 and not in pkg2..
  • * An element is in both pkg1 and pkg2 but a difference exists; differences are displayed.

If the -a option is specified, a blank space occurs at the beginning of the line for all objects or files that are contained in both pkg1 and pkg2.