I would like to know if a file is open by any process (including the caller) There are a number of suggestions already posted, which tend to revolve around trying to open the file exclusively and catching the exception.
This has not proven to be a fool-proof method in my instance. I beleive in my specific situation I can get by with scanning the names all open handles of type File of all running processes.