What symptoms indicate that the script can not find the DB file? I do not see any logging in your script that would document what exactly the problem is. Please add some additional conditionals as well as check @error and @serror frequently and log a description of the check, the values of variables, and the result to a file. This way you can review all the nasty details of the script execution.

_________________________
Home page: http://www.kixhelp.com/hb/