djsam Level: Trainee
 Registered: 24-05-2005 Posts: 1
|
vbscript code & ASP
I'm trying to incorporate this piece of code in an ASP file to display some information but it keeps crashing with msg:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FolderExists'
This is the code:
<SCRIPT LANGUAGE="VbScript">
Function FolderExists(ByVal strPath As String) As Boolean
Dim s As String
If Right(strPath, 1) = "\" Then strPath = Left(strPath, Len(strPath) - 1)
s = Dir(strPath, vbDirectory)
If s <> "" Then FolderExists = True
End Function</SCRIPT>
Then calling the function later in ASP file (code)...
If FolderExists(FolderContent) then
response.write "test folder exist"
end if
Any assistance will be appreciated.
|