>Hilmar,
>
>Thanks. That much I knew, but is that the best way? That just feels ... dirty ... to me. ;)
Any interaction with data outside the main program can easily fail for a variety of reasons. In this case: The file may not exist, you may not have access rights, or it may be blocked by another user. And probably a few others more; like: you want to write to the file, but the file is R/O.
So, it seems like a good idea to test for any possible exceptions anyway, not just because another user may have locked it.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)