ASPFileExistsメソッド_
❮完全なFileSystemObjectオブジェクトリファレンス
FileExistsメソッドは、指定されたファイルが存在するかどうかを示すブール値を返します。ファイルが存在する場合はTrueを返し、存在しない場合はFalseを返します。
構文
FileSystemObject.FileExists(filename)
Parameter | Description |
---|---|
filename | Required. The name of the file to check if exist |
例
<%
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オブジェクトリファレンス