All Posts

Content Update

S

By Suhas Das

Author

18 views

Updating a Documentum File Using IAPI Commands

Managing content in Documentum often requires direct interaction through IAPI commands, especially when performing low‑level operations such as downloading, modifying, and re‑uploading file content. Below is a simple walkthrough demonstrating how to retrieve a file from the repository, update it locally, and then save the changes back to Documentum.

1. Download the Existing File

To begin, identify the r_object_id of the document you want to modify. Once you have it, use the getfile command to download the content to a local directory:

Code
API> getfile,c,xxxxxxxxxxx,d:\temp\xxxxxxxxxxx.txt

This command extracts the content associated with the object ID and writes it to the specified file path on your local machine.

2. Modify the File Locally

After downloading, open the file in your preferred editor and make the necessary updates. Save the file once your changes are complete.

3. Upload the Updated File Back to Documentum

Next, fetch the object into the current client session:

Code
API> fetch,c,xxxxxxxxxxx
OK

Once fetched, use the setfile command to attach the updated local file to the object:

Code
API> setfile,c,xxxxxxxxxxx,d:\temp\xxxxxxxxxxx.txt
OK

Finally, commit the changes to the repository:

Code
API> save,c,l

Summary

This simple sequence—getfile → edit → fetch → setfile → save—provides a direct and efficient way to update content stored in Documentum. It’s especially useful for administrators or developers who need precise control over document versions or automated content updates.

0 Comments

Leave a Comment

Your email will not be published. Comments are subject to moderation.