<%
function fileStatus(folderspec,filename)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 in fc
if f1.name=filename then
condition=true
end if
Next
if condition = true then
response.write "文件存在"
else
response.write "文件不存在"
end if
end function
<%
function fileStatus(filespec)
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(filespec)) Then
response.write "存在"
else
response.write "不存在"
end if
end function