---
title: "Task progress"
source: https://dev.pageseeder.com/guide/publishing/ant_api/tasks/task_progress.html
description: "The ps:progress task sends progress updates, log messages, and result instructions to PageSeeder during script execution. It supports percent completion, status messages, and various result display options including window, panel, preview, link, URI link, or reload functionality."
last_updated: 2026-08-11T16:10:56+10:00
tokens: ~1126
---

# Task progress

*This task was introduced in PageSeeder version 6.2000.  
*

Sends progress info, log messages and result instructions to PageSeeder.

> **Note:** Use this task instead of the ANT `<echo>` and `<echoxml>` tasks to simplify the code and use new functionality.

## Definition

Minimal definition:

```xml
<ps:progress />
```

 Full definition:

```xml
<ps:progress percent="[0-100]"
             message="[message]"
             result="[window|panel|preview|link|urilink|reload]"
             resultfile="[result file path]">
  <fileset dir="[path]" includes="[pattern]" excludes="pattern" />
</ps:transform>
```

## Attributes

| **Attribute** | Description | Required | Default |
| --- | --- | --- | --- |
| **percent** | A number from 0 to 100 indicating the percentage of the script that has been completed. | No |  |
| **message** | A short description of what the ANT task will do next. | No |  |
| **result** | Instruction on how to process the script result. Can take the following values: `window`: display the result file in a new window.`panel`: display the result file in a panel on the right.`preview`: render the result PSML file (for upload preview scripts only).`link`: display a link to download the result file.`urilink`: display a link to open a document in the PageSeeder UI.`reload`: reload the current document. | No |  |
| **resultfile** | The path to the result file, for example: $\{ps.config.default.working\}/$\{ps.config.default.uri.filename.no.ext\}.pdf or for `urilink` the URI path, for example: /ps/acme/specs/mydoc.psml or /ps/uri/123 | Yes, if `result` specified and not `result="reload"` |  |

## Elements

### Element \<fileset\>

A single standard ANT [fileset](https://ant.apache.org/manual/Types/fileset.html) element can be used to include additional files in the result. The result file may be included in the fileset. This is useful for example when previewing an imported DOCX which is split into multiple PSML files in the upload or to include a CSS file for an HTML result.

If a fileset is specified the files it includes are copied to the following folder:

```
${ps.config.default.web.root}/session/${ps.config.default.session.folder}${ps.config.default.group.folder.no.prefix}/result/[result file name]
```

Otherwise the result file only is copied to the following folder:

```
${ps.config.default.web.root}/session/${ps.config.default.session.folder}${ps.config.default.group.folder.no.prefix}/result
```

## Examples

**Indicate progress**

The following example indicates the script is 40% complete and about to process documents.

```xml
<ps:progress percent="40"
             message="Processing documents" />
```

**Display or download result in a new window**

The following example displays the exported PDF in a new window.

```xml
<ps:progress result="window"
  resultfile="${ps.config.default.working}/${ps.config.default.uri.filename.no.ext}.pdf" />
```

**Display result in a panel**

The following example is taken from the sample bundle **Preview document as HTML** which can be viewed under the project admin **Template files \> Create** button. The result includes the CSS file from the `preview` folder under the `build.xml`.

```xml
<ps:progress percent="90"
             result="panel"
             resultfile="${working}/${ps.config.default.uri.filename.no.ext}.html">
  <fileset dir="preview" includes="*.css" />
</ps:progress>
```

**Display upload preview**

The following example is taken from the `document/docx/upload/build.xml` which can be viewed under administration **Templates \> Default files**. The result includes all the PSML files and images created by the import splitting up a DOCX file.

```xml
<ps:progress percent="90"
             result="preview"
             resultfile="${split}/${foldername}/${foldername}.psml">
  <fileset dir="${split}/${foldername}" includes="*.*,**" />
</ps:progress>
```

**Display a link to an uploaded document**

The following example is taken from the `batch/process/build.xml` which can be viewed under administration **Templates \> Default files**.

```xml
<ps:progress result="urilink"
             resultfile="${ps.param.destination.uri.path}/${filename}.psml" />
```

**Reload the current document**

The following example is taken from the sample bundle **Transform PSML document** which can be viewed under the project admin **Template files \> Create** button.

```xml
<ps:progress percent="100" message="Transformation successful!" result="reload" />
```

