Creation of copy of an existing database

Hi All

I am creating a copy of an existing database on the path specified by the user through a agent residing in it. This agent checks that if there is a database by the name and path already existing then it will only copy the docments in the existing database and will not create a new copy of the database.

My problem is that when the agent is done with creating a new copy of the existing database then it kind of locks the new copy of the database and does not allow me to open it stating that the FILE IS IN USE.

I need a method by which I can call the dbCache flush command through Lotus script

Thanks in advance

Shrihari