Hi all,

I am having a hard time deleting some files that I am attaching to an E-mail. After I send them, I want to archive them and delete them. The archive goes fine, but as soon as I try to delete them, I get an error stating "The file is in use by another process". I already tried by clearing the array I use to attach the files, but it does not help. This is what I am doing.

1. Create an array of file names within the directory and send it to a class, which is responsible for sending the E-mail with the attachments.

2. After the E-mail is sent, control is sent to the main code and I loop trhough the array to archive and delete the files.


Any help would be appreciated.

Thanks.