Scripting samples

ScriptDescription

Script - Basic samples 

  • Updates the repository statistics.
  • Creates folders and sets property group.
  • Shows the number of documents and folders, and the size of a given path.
  • Gets the path by UUID.

Script - Compact documents with size equal to 0 

Finds all documents with size=0 and compacts their version history to the latest version.

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 within the first-level folders (okm:root children folders).

Script - Exporter 

Performs 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 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 

Shows how to read PDF form fields.

Script - Recursive character renaming

Renames a character in all folders or documents from a specified 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 ]