Set FS=Server.CreateObject("Scripting,FileSystemObject")
Filepath=Server.MapPath("1.text")
if (FS.FileExists(Filepath)) then
Response.Write "文件" & Filepath & "存在!"
End if
楼上的兄弟说的对:zhuoren1(allok)的方法正好写反了
set f1=creatobject("scripting.filesystemobject")'创建文件对象
file="d:\aaa.htm"
'判断文件是否存在。
if not(f1.fileexists(file)) then
response.write "no file"
end if