ASP FileExists yöntemi
tanım ve kullanım
FileExists yöntemi, belirtilen dosyanın mevcut olup olmadığını belirten bir Boolean değer döndürür. Varsa True, yoksa False döndürür.
grama:
FileSystemObject.FileExists(filename)
parametre | tanım |
---|---|
filename | zorunlu. Var olan dosyanın adını kontrol etmek gerekiyor. |
örnek
<% dim fs set fs=Server.CreateObject("Scripting.FileSystemObject") if fs.FileExists("c:\asp\introduction.asp")=true then response.write("Dosya c:\asp\introduction.asp mevcuttur!") diğer response.write("Dosya c:\asp\introduction.asp mevcut değil!") if son fs=nothing ayarla %>