Skip to content

Scripting samples

Script Description
Script - Basic samples - Updates the repository statistics.
- Creates folders and sets the property group.
- Shows the number of documents, folders, and the size for a given path.
- Gets the path by UUID.
- Shows all documents used in all running workflows.
Script - Compact documents with size equal to 0 Finds all documents with size = 0 and compacts version history to the latest.
Script - Convert TIF to PDF Transforms all the TIF files in the repository to PDF.
Script - Count all child subfolders Counts all child folders and subfolders recursively in the first-level folder (okm:root children folders).
Script - Exporter Executes the repository export.
Script - Export repository folder to server as a ZIP file Exports the folder contents to the server application as a ZIP file.
Script - Deep folders Finds folders with a certain depth.
Script - Import data from CSV file Imports metadata group values from a CSV file.
Script - Purge all folders into a parent folder Purges all folders into a parent without first moving files to the trash.
Script - Purge all users’ trash Example of how to clean all users’ trash.
Script - Read PDF form fields How to read PDF form fields.
Script - Recursive character renaming Renames a character in all folders or documents from a given initial path.
Script - Recursive repository traversal Navigates across all repository nodes recursively.
Script - Recursive security change Changes the security.
Script - Security change at low level Changes the security at the database level.