Search code examples
filenet-p8filenet-content-engineibm-content-collector

IBM Content Collector FS to P8 Archiving


In my current project using IBM Content Collector 4.0.1 SP5 with IBM Filenet P8 Content Engine 5.2.1 I need to collect files from file system and add them to a certain P8's object store.

Report files are added into folders eight fixed folders and under them the structure grows dinamically over time with further nested folders following the form yyyy/mm:

Folder hierarchy

I started from the FS to P8 Archiving (Replicate File System and Detect Duplicates).ctms task route example in order to have the replicated structure in my object store.

FS to P8 Archiving task route Let's focus on the P8 File Document in folder task and particularly on the File in Folder Options.

The problem is that the path created in my repository contains also the drive letter (e.g.: E:\Report\AMM_000001_00001\2017\05) whereas I would like to have only the folder structure replicated starting from the Report folder.

How can I achieve this? Should I use regular expressions for this?


Solution

  • I managed to achieve the desired result using regular expressions in the "P8 File Document In Folder" task, like this:

    Purpose:            Get a folder path without a drive letter. 
    Regular expression: ^[^\\]* 
    Replacement string: $1 
    Sample text:        C:\folder 1\folder 2 
    Sample result:      \folder 1\folder 2
    

    as described here.