This macro generates an import xml file which, after imported, will mirror the filesystem. The import xml contains items of contenttype FileLink and a contenttype of your choosing (defaults to CMS Folder) representing the folders on disc, as well as delete instructions for items which do not have a corresponding file or folder on disc anymore. Required input parameters: location of the files (folder on disc) which should be mirrored, an itemnumber of the root item which should act as mirror of the filesystem and a filename (relative path) where the import xml file should be saved to.
Syntax
Smartsite SXML | Copy Code |
---|---|
<se:syncfilelinks> <se:parameters> <se:parameter name="location"> </se:parameter> <se:parameter name="item"> </se:parameter> <se:parameter name="filename"> </se:parameter> </se:parameters> </se:syncfilelinks> |
Parameters
Name | Data Type | Properties | Description |
---|---|---|---|
ContentTypeCodeFolders | String | - | Sets the content type code which should be used for folder items. |
ExcludeFileExtensions | String | - | Sets the file extensions (dot included, semicolon separated) which should be excluded. Defaults to ".exe;.dll;.db;.config". |
ExcludeFolders | Collection | - | Sets the folders (relative paths) which should be excluded. E.g. "/indexedcontent/extranetdocuments,/indexedcontent/restricted/documents". |
FileExclusionExpressions | Collection | - | Sets the file exclusion(regular) expressions. This parameter takes precedence over the ExcludeFileExtensions parameter. |
FileName | String |
IsRequired
|
Sets the name of the file to which the import xml should be saved. |
FolderExclusionExpressions | Collection | - | Sets the folder exclusion (regular) expressions. This parameter takes precedence over the ExcludeFolders parameter. |
Item | Locator |
IsRequired
|
Sets the (root) item, which should be used as filesystem mirror. |
Location | String |
IsRequired
|
Sets the location. This must be a folder on disc (relative path). |
SearchPattern | String | - | Sets the search pattern(s) (semicolon separated) for searching files. Defaults to "*.*". |
WriteFileProperties | Boolean | - | Sets if generic file properties should be written to the xml. |
Shared Parameters
Local Viper Methods
Viper | Extension | Description |
---|---|---|
This.ClearForcedResult |
Sets the result of the macro. used to override the normal handling of the result creation. |
|
This.GetForcedResult | Gets the forced result of the macro, set by overriding the normal rendering using SetForcedResult(). | |
This.RenderTime | ✓ | Returns the render time of the macro in milliseconds. |
This.SetForcedResult |
Sets the result of the macro. used to override the normal handling of the result creation. |