---
title: "Publish script"
source: https://dev.pageseeder.com/reference/glossary/publish_script.html
description: "Publish scripts are Apache Ant build files that enable batch processing of PSML documents through the Publish engine. They allow users to export, import, move files, and create documents at document, folder, or group levels."
last_updated: 2026-08-11T16:33:49+10:00
tokens: ~468
---

# Publish script

An [Apache Ant](https://ant.apache.org/) build file ([build.xml](file_build.md)) that calls the [Ant API](../../guide/publishing/ant_api.md) through [Ant tasks](ant_task.md) so they can be processed by the [Publish engine](publish_engine.md).

Through the Ant API, [PSML Ant scripts](../../guide/configuration/psml/psml_ant_scripts.md) can access in batch mode most of functionality that is available through both the user interface and the services. This allows scripts to:

- Export to non-PSML formats.
- Import from non-PSML formats.
- Move PSML files to another location.
- Create PSML documents using variables from a non-PSML source file.

> **Note:** Publish scripts are managed at the project level – this means all groups in a project access the same publish actions.

For users with admin rights, the Publish actions can be accessed on the **Publish scripts** page.

![Publish scripts page](/content/reference/glossary/../../images/glossary/publish_scripts_page_v60000.webp)

## Usage

Publish scripts can be configured for use as follows:

- **Document** – to process the currently open document. 

```text
/template/[project]/document/
```

- **Folder** – for processing an entire folder.

```text
/template/[project]/folder/
```

- **Group** – for processing a group. The `build.xml` file is under:

```text
/template/[project]/group/
```

- **Scheduled publishing script** – an alternate way to invoke the group publishing script at a specific time. All scheduled events can be viewed by [administrators](administrator.md). For further information, see [Scheduled jobs](scheduled_jobs.md).

## Example scripts

There is a growing set of scripts available to developers to use for learning or customization. The most up-to-date information is available on the PageSeeder [GitHub](https://github.com/pageseeder/pageseeder-tutorials) site.

