IBM Support

How to update the mime type of a set of document using the Multiselect Operations functionality in FileNet Enterprise Manager?

Technical Blog Post


Abstract

How to update the mime type of a set of document using the Multiselect Operations functionality in FileNet Enterprise Manager?

Body

The Mime Type property of a document object is read only and can only be set during a check in operation. The below procedure demonstrates how to use the scripting functionality in either the Multi select Operations or Content Engine Query Builder in FileNet Enterprise Manager to update the Mime Type property of existing documents. This is done by downloading and checking out the document, then updating the Mime Type property on the document check in within the script. In the example below, I am setting the Mime Type to be "text/html" but you can set it to be any valid Mime Type.

 

1. In FileNet Enterprise Manager, multiple-select the documents that need to be updated.
2. Right-click -> Multiselect Operations
3. Click on Script tab, and check "Execute Script"
4. Script Type: VBScript
5. Copy and paste the following:

 

Public Sub OnCustomProcess (CEObject)

Set filesys = CreateObject("Scripting.FileSystemObject")

If filesys.FileExists("c:\test.doc") Then
filesys.DeleteFile "c:\test.doc"
End If

CEObject.CopyContent " file:///c:/test.doc"
CEObject.Checkout
CEObject.Reservation.Properties("mimetype").Value= "text/html"
CEObject.Reservation.Save
CEObject.Reservation.Checkin "c:\test.doc"

End Sub


Disclaimer: This script is provided as is with no Support. It is the responsibility of the customer to test this script prior to it being run in production. The customer assumes all responsibility for running this script in their production environment.

 

I have created the following technote with the same information.

/support/pages/node/278391

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSNVNV","label":"FileNet Content Manager"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

UID

ibm11280560