View Full Version : file path problem

08-05-2004, 04:51 PM
How come this is not working? if I paste this address
(FilePath = "\\cbsapp014\qara_docs$\1.pdf") in either Windows Explorer or
a browser on my pc, It works and I see the pdf document. But my VBScript code
keeps saying file does not exist. Here's a piece of code

FilePath = "\\cbsapp014\qara_docs$\1.pdf"

if FSO.FileExists(Filepath) Then
'open file

'say file doesn't exist (I alwasy get this)

I desperately need an answer. Here's some info about the server.

the .asp file including the code is in the webserver's root directory
which is (d:\notes\data\domino\html\). The server is IIS. However, the .pdf file is being accessed through a webshare with path (\\cbsapp014\qara_docs$\1.pdf)but the actual physical path is (d:\quara_docs\1.pdf).

I want to access it through the webshare (gives me permission control) but I keep getting file doesnt exist when I view the .asp page (works fine from windows explorer or IE.
What's wrong with the code above?

Greatly appreciate any help,

08-05-2004, 05:13 PM
Possible solution:

When you're asking for the file, you asking under your rights. When the server askes for the file, it asks under its rights. Does your server have read access to that data share?

Roy Sinclair
08-05-2004, 08:04 PM
If you want that file to be accessible via IIS go into the IIS Manager and add a virtual directory which points to the remote server so the file ends up at a URL of http://yourserver/nameofyourvirtualdirectory/nameofthefileintheremotelocation