---
title: "Task ps-insert-xlink-batch (obsolete)"
source: https://dev.pageseeder.com/reference/version_5/ant_tasks/task_ps-insert-xlink-batch.html
description: "This expert task allows the ANT Script to upload a collection of XLinks object to the Pageseeder Server. Note: In order to use the InsertXLinkBatch function the user has to have administrator rights."
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~906
---

# Task ps-insert-xlink-batch

This expert task allows the Ant Script to upload a collection of XLinks object to the PageSeeder Server.

> **Obsolete:** This task has been removed as of v5.95, use request task and services instead.

> **Note:** Note: In order to use the `InsertXLinkBatch` function the user has to have administrator rights.

## Definition

```xml

<ps:ps-insert-xlink-batch
            jsessionid="[jsessionid]"
            port="[port]"
            host="[host]"
            siteprefix="[siteprefix]"
            servletprefix="[servletprefix]"
            output="[output]"
            broadcast="[true|false]"
            broadcastall="[true|false]"
            broadcastapprovers="[true|false]">
  <fileset dir="." includes="[files.xml]">
</ps:ps-insert-xlink-batch>
```

## Attributes

| **Attribute** | Description | Required |
| --- | --- | --- |
| **jsessionid** | The `@jsessionid` attribute (optional) is used for authentication. It is not required but it will always be used if specified. | Yes, unless **username/password** or **propertiesfile** are specified |
| **username** | If `@jsessionid` attribute is not specified this can be used for authentication. | Yes, unless **jsessionid** or **propertiesfile** are specified |
| **password** | If jsessionid is not specified this can be used for authentication. | Yes, unless **jsessionid** or **propertiesfile** are specified |
| **propertiesfile** | The `@propertiesfile` attribute (optional) describes the location of the properties file to use to connect to the PageSeeder Server. The value of the attribute can be the full path of the file, the relative path (the base directory is the location of the Ant script) or simply its name, in which case it MUST be located on the classpath. | Yes, unless **(jsessionid** or **username/password)** and **host** are specified |
| **port** | The port address of the PageSeeder Server - default: 80 *(used when no properties file is specified)* | No |
| **host** | The host name of the PageSeeder Server *(used when no properties file is specified)* | Yes, unless **propertiesfile** is specified |
| **siteprefix** | The PageSeeder site prefix defined - default: /ps *(used when no properties file is specified)* | No |
| **servletprefix** | The PageSeeder servlet prefix defined - default: /servlet *(used when no properties file is specified)* | No |
| **output** | Specifies the path of the file to write the response to | Yes |
| **broadcast** | The broadcast flag for the insert XLink (default: false). | No |
| **broadcastall** | The broadcast all flag for the insert XLink (default: false). | No |
| **broadcastapprover** | The broadcast approver flag for the insert XLink (default: false). | No |

## Fileset

The ps-insert-xlink-batch must have at least one inner **fileset** element. It should point to one or more XML document containing the definition of an XLink object.

The format for XLink documents is validated by the schema WEB-INF/template/default/InsertXLinkBatch/Schema/InsertXLinkBatch.xsd.

## Examples

Stand alone script example:

```xml

<ps:ps-insert-xlink-batch
    output="c:\output\results.xml"
    host="mycompany.com"
    username="jsmith" password="xyz">
  <fileset dir="c:\upload\xlinks" includes="**"/>
</ps:ps-insert-xlink-batch>
```

Publish script example:

```xml

<ps:ps-insert-xlink-batch
    output="${ps-working}/results.xml"
    jsessionid="${ps-jsessionid}"  host="${ps-host}" port="${ps-port}"
    servletPrefix="${ps-servletPrefix}" sitePrefix="${ps-sitePrefix}">
  <fileset dir="${ps-working}/xlinks" includes="**"/>
</ps:ps-insert-xlink-batch>
```

