You could try to lock the file. If you can then the file is not in use. If you can't its open or being used. Problem may come in if a sever has it open.....
Post by nomar26 Is there any way to find out if a database is open or running and then run a program based on the result?