IPublishPostProcessPlugin - IshCopyToShare
Copies and renames the file on the filesystem that are present in the Items collection.
Plugin Input
Plugin configuration parameters
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| FullPathToCopyFileContextItemsKey | Yes | Valid key name, present in items collection | Item containing the path to the file that should be copied. | |
| DestinationDirectory | Yes | Valid path to folder | Specifies the full path to the folder where the file should be copied. | |
| DestinationFileContextItemKey | Yes | The name of key of output parameter to be added to Items collection | The output value with the full path to copied file will be added to the context.Items collection and assigned to this key.
| |
| MinimumFileTitleLength | No | 10 | Valid integer number which must not exceed 20 | Specifies the minimum length of title that must remain in the name of file after renaming. |
| MaximumFileNameLength | No | 160 | Valid integer number which must not exceed 160 | Specifies the maximum length of name of file after renaming. |
Plugin Outcome
Changes made to the file system:
- New file created.
Values set in the
context.Items collection as a result
| Item Key | Typical Value | Item Value Type | Description |
|---|---|---|---|
The name of key is specified in the input parameter DestinationFileContextItemKey | String | The full path to copied file. |
plugin name="ISHCOPYTOSHARE" example
<plugin name="ISHCOPYTOSHARE" handler="IshCopyToShare">
<description>This plugin copies and renames the file on the filesystem that are present in the Items collection.</description>
<initialize>
<parameters>
<parameter name="FullPathToCopyFileContextItemsKey">FullPathToCopyFile</parameter>
<parameter name="DestinationFileContextItemKey">DestinationFilePath</parameter>
<parameter name="DestinationDirectory">c:\temp</parameter>
<parameter name="MinimumFileTitleLength">15</parameter>
<parameter name="MaximumFileNameLength">160</parameter>
</parameters>
</initialize>
</plugin>
Plugin flow
- The
IshCopyToSharePlugincopies and renames the file given in theFullPathToCopyFileContextItemsKeyto folder specified inDestinationDirectory. - The value of the
MinimumFileTitleLengthparameter is the minimum length of title that must remain in the file name after file renaming. - The value of the
MaximumFileNameLengthparameter is the maximum length of name of file after renaming. - The
FullPathToCopyFileContextItemsKeyparameter can be a string containing only one path to file that should be copied. - The path to the copied file will be written to the Items collection with the corresponding key, which is specified in the parameter
DestinationFileContextItemKey