docServerUserLandCom picture
Contents
Frontier Site

file.setModified

Syntax file.setModified (path, when)

Params path is a legal path name to the file or folder whose modification date you wish to set.

when is a date/time value or an expression that returns such a value. Generally, it uses clock.now or a calculation based on clock.now, but it can take any value that can be interpreted as a date including dates in string form.

Action Sets the modification date of the file.

Returns True if the file's modified date is successfully changed, false otherwise

Examples file.setModified ("C:\\Program Files\\Frontier\\sample.txt", clock.now ())

   » true


file.setModified ("System:tmp", clock.now ())

   » true

file.setModified ("System:tmp", 0)

   » true

This script sets the date to 1/1/1904 12:00AM .

Notes Any operation that changes a file automatically updates its modification date.

You can get the modification date using the file.modified verb.

A file's modification date is very important - it can be used for backup scripts.

Generally speaking, you should not explicitly change a file's modification date.

See Also file.modified


© Copyright 1992-2026 UserLand Software. Email: webmaster@userland.com.