Skip to main content
Participating Frequently
March 31, 2010
Question

CreatDate and ModifyDate

  • March 31, 2010
  • 2 replies
  • 1689 views

Hi everyone,

Searching already for days now without any success

I´m searching for a script, which is filling a selected textbox with the CreatDate and ModifyDate. When opening a Illustrator file  with a texteditor, I can find the corresponding entries, but I couldn´t find out how to get this scripted in Illustrator CS3 or CS4.

The entry in the texteditor looks like:

xmlns:xap="http://ns.adobe.com/xap/1.0/"

            xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/">

         <xap:CreatorTool>Adobe Illustrator CS3</xap:CreatorTool>

         <xap:CreateDate>2010-03-30T15:31:21+02:00</xap:CreateDate>

         <xap:ModifyDate>2010-03-30T15:33:37+02:00</xap:ModifyDate>

         <xap:MetadataDate>2010-03-30T15:33:37+02:00</xap:MetadataDate>

         <xap:Thumbnails>

            <rdf:Alt>

Couldn´t find anything in the documentation for Illustrator Scripting how to place or read out these two Dates.

Any help would be highliy appriciated.

Thanx in advance

cheers

Günther

This topic has been closed for replies.

2 replies

artchrome
Inspiring
March 31, 2010

Hi,

Moreover you can read also like this:

#target illustrator

var content=activeDocument.XMPString;
var Cdate=content.substr(content.indexOf("<xmp:CreateDate>")+16,(content.indexOf("</xmp:CreateDate>"))-(content.indexOf("<xmp:CreateDate>")+16));
var Mdate=content.substr(content.indexOf("<xmp:ModifyDate>")+16,(content.indexOf("</xmp:ModifyDate>"))-(content.indexOf("<xmp:ModifyDate>")+16));
alert ("created on : "+Cdate+"\rModified on: "+Mdate);

Cyao, art.chrome

macos4uAuthor
Participating Frequently
March 31, 2010

Thanx for your help

Will Rey asap

Cheers

Günther

Von meinem iPhone gesendet

Am 31.03.2010 um 19:11 schrieb artchrome <forums@adobe.com>:

Hi,

>

Moreover you can read also like this:

>

#target illustrator

>

var content=activeDocument.XMPString;

var Cdate=content.substr(content.indexOf("<xmp:CreateDate>")+16,

(content.indexOf("< /xmp:CreateDate>"))-(content.indexOf

("<xmp:CreateDate>")+16));

var Mdate=content.substr(content.indexOf("<xmp:ModifyDate>")+16,

(content.indexOf("< /xmp:ModifyDate>"))-(content.indexOf

("<xmp:ModifyDate>")+16));

alert ("created on : "Cdate"\rModified on: "+Mdate);

>

Cyao, art.chrome

>

Muppet_Mark-QAl63s
Inspiring
March 31, 2010

Creation Date & Modification Date are both properties of the 'File' object. If you know the file path of the Document then you can read the properties and use them. See this post only made the other day where this was done…

http://forums.adobe.com/thread/604164?tstart=0

macos4uAuthor
Participating Frequently
March 31, 2010

Thanx a million for the fast reply

haven´t found the other post the day before

you made my day