Purging from the command line
If you create a Purge XML file, you can purge from the command line and schedule purging tasks.
<?xml version="1.0"?>
<XML>
<Settings>
<LoggingDirectory>C:\Temp</LoggingDirectory>
<LogFilePrefix>Purge_</LogFilePrefix>
<Items Purge="true">
<Keep>1</Keep>
<DaysToKeep>0</DaysToKeep>
<Recursive>1</Recursive>
</Items>
<ProcessHistories Purge="true" Before="1999-12-23"/>
<PublishTransactions Purge="false" Before="2006-05-04">
<State Purge="true">Success</State>
<State Purge="true">Failed</State>
</PublishTransactions>
</Settings>
<Scan>
<Root Purge="True"/>
<Entry URI="tcm:0-5-1" Purge="True">
<![CDATA[ASP-Javascript-Slave]]>
</Entry>
<Entry URI="tcm:5-3-4" Purge="True"><![CDATA[root]]></Entry>
<Entry URI="tcm:5-2-2" Purge="True"><![CDATA[Building Blocks]]>
</Entry>
<Entry URI="tcm:5-4-2" Purge="True"><![CDATA[F1]]></Entry>
<Entry URI="tcm:0-7-1" Purge="True"><![CDATA[Publication A]]></Entry>
<Entry URI="tcm:7-3-4" Purge="True"><![CDATA[root]]></Entry>
<Entry URI="tcm:7-2-2" Purge="True"><![CDATA[Building Blocks]]></Entry>
<Entry URI="tcm:2-4-2" Purge="True"><![CDATA[F1]]></Entry>
</Scan>
</XML>
The XML file provides instructions about the purge action and may contain the following parameters for the Purge action:
| Element | Description |
|---|---|
Logging Directory | The location of the output log directory. |
LogFile Prefix | The prefix of the log file; for example, purge_ |
Items | This element has one attribute: The
|
Process History | This element determines if Workflow Process Histories are to be purged. This element has the following attributes:
|
Publish Transactions | This element determines if Publish Transactions are to be purged. This element has the following attributes:
The |
Entry | The For example: Where: The Title of the item is used for display purposes only. If the text contains special XML characters (such as “&”, “?” and “/”), it must be enclosed in a |