filesuperdate(
PATH
)

The filesuperdate( function returns the modification date and time of a file.


Parameters

This function has one parameter:

path – is a path to the file, including the file name (see Files and Folders for more information about file paths).


Description

This function returns the modification date and time of the specified file as a superdate (see superdate(). This is especially useful for comparing two files to see which one is newer.

This example checks to see if the news.txt file is more than 36 hours old, and if so, deletes it.

if filesuperdate("~/Documents/news.txt") < supernow() - 60 * 60 * 36
    fileerase "~/Documents/news.txt"
endif

Tip: If you want to display the date, use the superdatepattern( function.

Legacy Syntax (Separate Folder and File Parameters)

In older versions of Panorama (6.0 and earlier) the filesuperdate( function had two parameters, folderid and filename. To maintain compatibility with older databases, two parameters will still work, as shown in this example:

filesuperdate(folder("~/Documentation"),"news.txt")

For new databases you’ll probably find it easier to use the single parameter mode.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now may have either one parameter (path) or two (folder, path).