ez projects / batchtool

Attention please: Due to restructuring legacy services, the eZ Projects service is going to be discontinued. All the current repositories will be migrated to a new platform. More details will be announced soon.


UNIX name Owner Status Version Compatible with
batchtool Arne Bakkebø stable 1.0 4.x (probably also earlier)
Command line utility to do the same operations on lots of
selected objects/nodes. For instance to move, copy or delete a bunch of
nodes. It is based on filters that fetches the objects to operate on,
utilizing the fetch functions in eZ Publish for a flexible selection of

This extension have now been moved to Github. Feel free to download the latest version from there:

This is intended as a command line tool, allthough I've set it up as a cronjob in case that could come in handy for some tasks.

Allthough this extension have proved to work well, it can potentially mess up your database. You are therefore highly encourraged to make a backup before starting!

To install extract extension to the extension/batchtool/ directory.
Activate the new extension by adding it in settings/override/site.ini.append.php like this:

Run the tool from command line like this:

php runcronjobs.php batchtool [--and] [--or] --filter="<filter>" [--filter="<filter>"] [...] --operation="<operation>" [--operation="<operation>"] [...]

--filter: Specifies a filter name and potential parameters for it
--operation: Specifies an operation name and potential parameters for it
--or: Creates a logical OR operation between filters (default)
--and: Creates a logical AND operation between filters

The format of filter and operation parameters are as follows:
"<filter/operation name>;<parameter name1>=<value1>;<parameter name2>=<value2>;..."

From command line the quotes must be included, or the shell will interpret the semicolons.

The filters fetches the selected objects, specifying which objects to work on. There can be any number of filters, and each filter returns a set of objects. The objects are then combined to set up the object list that should be processed by the operations in this job. The combining of objects can be done by a logical AND or a logical OR operation. This is specified with the --and or --or parameters. Combining --and and --or in one command is not possible, if --and is specified anywhere it will have priority.

From the object resultset of the filtering, the specified operations are then given one object at a time, and processes each one of them in the same manner. As with filters there can be any number of operations, and each one of them will be used in specified order on each object.

Adding custom filters and operations are possible. For more information and examples, read the INSTALL file included in the package!

No news yet.

Average rating 4.00 by 1 reviewers.