Hi,

My question is about deleting a temp pst file that is created by our code in Vista environment.

Code makes a copy of the system user profile pst with a different name, uses that file to open other emails and attachments for us to extract. After we are done, we delete the temporary file using kill filename.

Although this works fin in XP, somehow vista is holding on to the file longer time while code is running. If I debug it, kill function works, although still need to wait a second or two.

How can release that pst file and make sure that I can delete it in the code? Is there such a command or tricks to it?

Thanks