IPublishPostProcessPlugin - IshDeleteFromFileSystem
Deletes files or folders that match the given pattern.
Plugin Input
Plugin configuration parameters
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| StartFolderContextItemsKey | Yes | - | Valid key name, present in items collection | Item containing the path or list of paths to folders where the files or folders to delete are located. |
| Patterns | Yes | - | Valid patterns to search files or folders | The patterns that can be used to find the files or folders to delete. This parameter can contain multiple values separated by comma-space. |
| DeleteRecursively | No | No | Yes, No | Specifies whether files should be deleted recursively or not. |
plugin name="IshDeleteFromFileSystem" example
<plugin name="ISHDELETEFROMFILESYSTEM" handler="IshDeleteFromFileSystem">
<description>Deletes file or folder based on a certain file pattern matching rule.</description>
<initialize>
<parameters>
<parameter name="StartFolderContextItemsKey">LanguageDirectories</parameter>
<parameter name="Patterns">Plugin.ISHCHECKREFERENCES.*.log, baseline.*.xml</parameter>
<parameter name="DeleteRecursively">No</parameter>
</parameters>
</initialize>
</plugin>
Plugin flow
- The
IshDeleteFromFileSystemPlugincollects all the files and folders matching one of the patterns given in thePatternsparameter underneath the folder or folders specified in theStartFolderContextItemsKeyparameter and deletes them. - If the value of the
DeleteRecursivelyparameter isYes, all the folders and files that match in the subfolders recursively will be deleted. - The
StartFolderContextItemsKeyparameter can be a string containing only one folder path or a list of string with the paths to several folders. In that case a collect/delete is performed in each folder of the list.