PaulEijkman
Technical User
Hi,
I have a problem with GetFile. When I run the code below on IIS ( XP pro ) It will not respond nor generate an error message even when the file ABCtest.txt exists. If I omit the GetFile line and the following line the codes works fine and reports a path and existing file. Guess I am missing something .... Can you help me here ?
Paul.
Code:
Set objFSO = Server.CreateObject ("Scripting.FileSystemObject"
strFilespec2rel = Server.MapPath("ABCtest.txt"
Response.Write strFilespec2rel &"</br>"
Response.Write "err1" & VbCRLF & Err.Description & "</br>"
If (objFSO.FileExists(strFilespec2rel)) Then
strMsg = strFilespec2rel & " exists!!."
Else
strMsg = strFilespec2rel & " doesn't exist."
End If
Response.Write strMsg & "</br>"
Response.Write "err2" & VbCRLF & Err.Description & "</br>"
Set myFile = objFSO.GetFile(strFilespec2rel)
strDate= myFile.DateCreated
Response.Write strDate &"</br>"
Response.Write "err3" & VbCRLF & Err.Description & "</br>"
Set objFSO = Nothing
I have a problem with GetFile. When I run the code below on IIS ( XP pro ) It will not respond nor generate an error message even when the file ABCtest.txt exists. If I omit the GetFile line and the following line the codes works fine and reports a path and existing file. Guess I am missing something .... Can you help me here ?
Paul.
Code:
Set objFSO = Server.CreateObject ("Scripting.FileSystemObject"
strFilespec2rel = Server.MapPath("ABCtest.txt"
Response.Write strFilespec2rel &"</br>"
Response.Write "err1" & VbCRLF & Err.Description & "</br>"
If (objFSO.FileExists(strFilespec2rel)) Then
strMsg = strFilespec2rel & " exists!!."
Else
strMsg = strFilespec2rel & " doesn't exist."
End If
Response.Write strMsg & "</br>"
Response.Write "err2" & VbCRLF & Err.Description & "</br>"
Set myFile = objFSO.GetFile(strFilespec2rel)
strDate= myFile.DateCreated
Response.Write strDate &"</br>"
Response.Write "err3" & VbCRLF & Err.Description & "</br>"
Set objFSO = Nothing