Store the directory as a session variable and refer to the session variable as the path. That way you wouldn't need the rstVisitor recordset on each page.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.