[This is preliminary documentation and subject to change]

## #flastmod

The #flastmod directive instructs the Web server to insert the last time that a specified file was modified. You must surround a directive with HTML comment delimiters.

By default, this directive can be used only in STM pages; it cannot be used in ASP pages. To perform this task with ASP script, you can use the FileSystemObject object which is documented at MSDN under VBScript or JScript.

###### Syntax

<!-- #flastmod PathType= FileName-->

###### Parameters

PathType

Specifies the type of the path to FileName. The path type can be one of the following:

Path Type | Meaning
File | The file name is a relative path from the directory containing the document with the #flastmod directive.
Virtual | The file name is a full path from a virtual directory in your Web site.

FileName

Specifies the name of the file for which you want the last modification time. FileName must contain the file name extension, and you must enclose the file name in quotation marks (").

###### Remarks

The file containing this directive must use a file name extension that is mapped to the SSI interpreter; otherwise, the Web server will not process the directive. By default, the file name extensions .stm, .shtm, and .shtml are mapped to the SSI interpreter (ssinc.dll).

An STM page using the #echo directive must be run by itself, or by calling it from an ASP page with Response.Redirect. Calling an STM page from an ASP page with Server.Transfer, Server.Execute, or #include will not work because that would force the STM page to go through asp.dll instead of through ssinc.dll.

If you have the IIS snap-in installed, you can modify default extension mappings and add new mappings; see Setting Application Mappings. Since you cannot map a file extension to more than one executable, you cannot use this directive in ASP files. ASP files are already mapped to the asp.dll and must stay that way.

###### Example

--- SSI.stm ---

    <!-- #config ERRMSG = "An error occurred processing a directive." -->

    SSI.stm was last formatted on
    <!-- #config TIMEFMT = "%A, the %d of %B, %Y, at %H:%M" -->
    <!-- #flastmod FILE = "ssi.stm" -->
    <BR>

    The size of SSI.stm in bytes is
    <!-- #config SIZEFMT = "BYTES" -->
    <!-- #fsize FILE = "ssi.stm" -->
    <BR><BR>

    This line will print out the ERRMSG configured above<BR>
    <!-- #config SIZEFMT = "BYTE" -->

© 1997-2001 Microsoft Corporation. All rights reserved.