Scripting samples

ScriptDescription

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 every running workflow.

Script - Compact documents with size equal to 0  

Finds all documents with size=0 and compacts the history of versions 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 starting from the first-level folders (okm:root child 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 - Folders deep 

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  

Purges all folders into a parent folder 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 change security 

Changes the security.

Script - Security change at low level 

Changes the security at the database level.

 

Table of contents [ Hide Show ]