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.

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

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.

11/27/01: Added support for callback scripts that gain control after the file has been written. They live in user.callbacks.fileSetModified, take one parameter, the path to the file whose mod date was set. The returned value of the callback is ignored. Callbacks were also added for file.writeWholeFile.

See Also file.modified

Discuss