Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ASP Tools Component FileExists Method

The FileExists method checks the existence of a file. It returns -TRUE if the specified URL exists within a published directory. If the file does not exist, it returns FALSE.

Arguments: ASP Tools Component FileExists Method

URL

A string that specifies the relative URL of the file you are checking.

Remarks: ASP Tools Component FileExists Method

FileExists only checks the existence of files published on your site. Therefore, it takes a relative URL rather than an absolute URL.

Examples: ASP Tools Component FileExists Method

The following example demonstrates using the FileExists property to create a link if a particular file is present.

<%If Tools.FileExists("ie_animated.gif") then %>

<p> <a HREF="/isapi/gomscom.asp?TARGET=/ie/"><img src="ie_animated.gif"></a> 

<% End If %>

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.