OS Copy of Mail File using LS

All:I have researched the forums and cannot seem to find any advice on this one, so I am throwing it out here.

I am creating a termination db which I does a number of things; however, there is one piece that I cannot seem to tackle.

Our procedure is to make an archive os copy of a user’s mail file after they leave. I would like to have the scheduled agent do this.

The agent already has a handle on the user’s person document in the Domino Directory, so it knows the server and mail file location & name. I imagine I would convert this then to a UNC share path to get to the mail file. I then want to copy it via the operating system to the archive server.

Has anyone ever done this? I have done a few attempts at it using Filecopy but every effort I try gives file not found.

If anyone has done this before and have some suggestions or code examples, it would be greatly appreciated. If you are interested in seeing my full piece of code thus far, to see if it sparks some thoughts, please email me.

Thanks

David Geddings

david.geddings@gmail.com

Subject: OS Copy of Mail File using LS

If the agent is scheduled it does not know about shares. I recently ran into this problem with an agent I am running which tries to copy giles using UNC path and shares. I was getting the same file not found error. I don’t recommend making OS level file copies though. If the file is modifed in any way during the copy process it could become corrupt and unusable. Why can’t you create a replica on the archive server instead? Just use the CreateReplica method of the NotesAdministrationProcess class to create the replica using AdminP. Then you can run an agent of some sort to comapre doc count on newly created replicas against the prod. mail file and when the doc count matches you’ll know the replicas are the same and the original mail file can be deleted.

Subject: OS Copy of Mail File using LS

I have done similar work with the shell command