FileExists

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

Syntax

Tools.FileExists(URL)
 

Parameters

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

Remarks

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

Example

The following code is derived from the default.asp page used by Microsoft?Personal Web Server for Macintosh.

<%If Tools.FileExists("ie_animated.gif") then %>
    <p> <a href="http://www.microsoft.Com/ie/"><img src="ie_animated.gif"></a>
<% End If %>
 

Applies To

Tools Component

See Also

ProcessForm, Random