ASP FileExists ·½·¨
¶¨ÒåºÍÓ÷¨
FileExists ·½·¨¿É·µ»ØÖ¸Ê¾Ö¸¶¨µÄÎļþÊÇ·ñ´æÔڵIJ¼¶ûÖµ¡£Èç¹û´æÔÚ£¬Ôò·µ»Ø Ture£¬·ñÔò·µ»Ø False¡£
Óï·¨£º
FileSystemObject.FileExists(filename)
²ÎÊý | ÃèÊö |
---|---|
filename | ±ØÐèµÄ¡£Ðè¼ì²âÊÇ·ñ´æÔÚµÄÎļþµÄÃû³Æ¡£ |
ʵÀý
<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists("c:\asp\introduction.asp")
=true then
response.write("File c:\asp\introduction.asp exists!")
else
response.write("File c:\asp\introduction.asp does not exist!")
end if
set fs=nothing
%>