Available for: Content Management Server
Task: The procedure imports the files in a directory into the Content Manager. Subdirectories are taken into account recursively.
Additional information: A folder called
startName will be created below the
parent folder. Into this
startName folder, the content is imported. A folder
with the same name as the directory will be created for each further
directory to be imported. If there is a file named index.html in
a directory, it will be imported as the main content of the corresponding
created folder. The procedure will finally return a list of the files that
cannot be imported (because the format could not be clearly determined).
Syntax:
loadSubtree parent startDir startName pubObjClass [mapping]
Function parameters:
parentis the ID of the folder in which the subhierarchy is created.startDiris the path of the directory which is to be imported.startNameis the name of the starting folder.objClassis the name of the format on which the created folders are to be based.mappingis a list with assignments. Each setting is a list containing the following parameters (in the order given here):-
contentType: the file name extension for which a format is set. -
objClass: the format on which the files are to be based which are created forcontentTypetype files.
-
Return value if successful: none
Necessary permissions: The user must have the
permissionCreateChildren permission for the starting folder. In
some cases further permissions are required, for example, permission to use a
file format.
Example:
CM>loadSubtree /internet /tmp/import press press_folder {{html press_doc} {pdf pdf_doc}}