How to handle locked documents
I have a program that goes through a directory and finds all word files and deletes their templates. I have it skipping read-only files but when it comes across a file that is locked because it is in use by another user, the program crashes and my exception handler won't catch it. I can't seem to find any way of checking for this and handling it. How can I catch these files or at least skip them?
|