Re: File creation date in a macro?
Posted by dscho on Nov 06, 2008; 9:33am
URL: http://imagej.273.s1.nabble.com/File-creation-date-in-a-macro-tp3694500p3694509.html
Hi,
On Wed, 5 Nov 2008, Bill Mohler wrote:
> How can I read the creation date of a file from within a Macro? I see a
> command to get the modification, but would much prefer to get the
> creation date/time.
Unfortunately, this is not possible with the macro language so far. You
might be able to use a command similar to
ctime = eval('script',
'new java.io.File("my-file.txt").getCreationDate();');
with the JavaScript plugin. Unfortunately, I was not able to test this,
so you will most likely have to adjust this slightly.
Alternatively, you can use any other script plugin, such as Javascript,
Jython, JRuby or Clojure.
Hth,
Dscho