UnauthorizedAccessException deleting dir after CompressDirectory

May 25, 2012 at 6:51 PM

I am using SevenZipCompressor successfully to compress a directory for backup. Afterwards, I want to delete the directory I just got done compressing. However, I am running into UnauthorizedAccessException. The only thing I can figure is that compressor (or 7-zip in a COM process or something) still has a lock on that directory? Is there a way I can mark the directory for deletion at the next available opportunity?