Latest web development tutorials

ASP FileExists Metodo

FileSystemObject Object Reference Completa FileSystemObject Object Reference

FileExists metodo restituisce che indica il file specificato esiste valore booleano. Se c'è, restituisce Ture, altrimenti False.

grammatica

FileSystemObject.FileExists(filename)

参数 描述
filename 必需的。需检测是否存在的文件的名称。


Esempi

<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists("c:\asp\introduction.asp") 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
%>


FileSystemObject Object Reference Completa FileSystemObject Object Reference