Documentation Center

IPublishPostProcessPlugin - IshDeleteFromFileSystem

Deletes files or folders that match the given pattern.

Plugin Input

Plugin configuration parameters
ParameterRequiredDefault valueAllowed valuesDescription
StartFolderContextItemsKeyYes-Valid key name, present in items collectionItem containing the path or list of paths to folders where the files or folders to delete are located.
PatternsYes-Valid patterns to search files or foldersThe patterns that can be used to find the files or folders to delete. This parameter can contain multiple values separated by comma-space.
DeleteRecursivelyNoNoYes, NoSpecifies 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 IshDeleteFromFileSystemPlugin collects all the files and folders matching one of the patterns given in the Patterns parameter underneath the folder or folders specified in the StartFolderContextItemsKey parameter and deletes them.
  • If the value of the DeleteRecursively parameter is Yes, all the folders and files that match in the subfolders recursively will be deleted.
  • The StartFolderContextItemsKey parameter 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.