Esko Logo Back to Esko Support
Choose your language for a machine translation:


Description

I would like to retrieve and use the Modification Date / Last Modified Date of a file as a SmartName. How can I do that?

Procedure

This can be achieved by setting up a Script SmartName with the following content:

var localfile = "<<filespec/>>".replace("file://", "//");
var file = new java.io.File(localfile);
var dtmModified = file.lastModified()
dtmModified

To get a readable time format, go to Formatting Options... and do the following:

  1. Set Data Format  to "Date and Time"
  2. Set Format to "ISO 8601"
  3. Select your Time Zone
  4. In the Input Format Options..., set Format to "UNIX Time (in milliseconds)", as that is the format Automation Engine uses internally for time notifications. 

Esko does not provide or support Scripts or guarantee the expected functioning of user scripts. This page merely serves as a tip.

Article information
Applies to

Automation Engine all versions

Created

 

Last revised
AuthorANDS
Case Number01088264
Contents