Hi all,
I am having trouble getting the FileExists method to return true when I pass it a valid UNC Path to a file ("testfile.txt").
background: i have created a virtual directory in IIS 5.0 named "SubmitFiles" on Server1 that points to a directory on another server ("Server2"). I need to check whether a file exists or not before adding a file to the directory.
<%
...
Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
Response.Write Server.MapPath("SubmitFiles\testfile.txt")
Response.Write "<BR><BR>"
IF ObjFSO.FileExists(Server.MapPath"SubmitFiles\TableScripts.sql")) Then
Response.Write "yes, file exists!
"
Else
Response.Write "no, file does not exist. :-("
End If
set objFSO = Nothing
%>
I am connecting to the SubmitFiles virtual directory with an Administrator account on our network that has basically full access. I have given the directory on "Server2" permissions to the IUSR_Server1 user.
I am at a complete loss as to why the FileExists method is returning false when I know the file does exist..
Any ideas/suggestions??
thanks in advance,
dmill
======================================
"I wish that I may never think the smiles of the great and powerful a sufficient inducement to turn aside from the straight path of honesty and the convictions of my own mind."
-David Ricardo, classical economist
======================================
I am having trouble getting the FileExists method to return true when I pass it a valid UNC Path to a file ("testfile.txt").
background: i have created a virtual directory in IIS 5.0 named "SubmitFiles" on Server1 that points to a directory on another server ("Server2"). I need to check whether a file exists or not before adding a file to the directory.
<%
...
Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
Response.Write Server.MapPath("SubmitFiles\testfile.txt")
Response.Write "<BR><BR>"
IF ObjFSO.FileExists(Server.MapPath"SubmitFiles\TableScripts.sql")) Then
Response.Write "yes, file exists!
Else
Response.Write "no, file does not exist. :-("
End If
set objFSO = Nothing
%>
I am connecting to the SubmitFiles virtual directory with an Administrator account on our network that has basically full access. I have given the directory on "Server2" permissions to the IUSR_Server1 user.
I am at a complete loss as to why the FileExists method is returning false when I know the file does exist..
Any ideas/suggestions??
thanks in advance,
dmill
======================================
"I wish that I may never think the smiles of the great and powerful a sufficient inducement to turn aside from the straight path of honesty and the convictions of my own mind."
-David Ricardo, classical economist
======================================