Metoda ASP FileExists


❮ Kompletní reference objektu FileSystemObject

Metoda FileExists vrací booleovskou hodnotu, která označuje, zda zadaný soubor existuje. Vrátí True, pokud soubor existuje, a False, pokud ne.

Syntax

FileSystemObject.FileExists(filename)

Parameter Description
filename Required. The name of the file to check if exist

Příklad

<%
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
%>

❮ Kompletní reference objektu FileSystemObject