• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Change of file creation date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change of file creation date


  • Subject: Re: Change of file creation date
  • From: Axel Luttgens <email@hidden>
  • Date: Tue, 13 Apr 2004 23:19:50 +0200

Heinrich Bjerregaard wrote:

I want to set the file creation date of my JPEG file to that of the camera's shooting date (which can be found in the JPEG file).
From AppleScript I can change the modification date - not the creation date, however, is it possible e.g. through a 'do shell script' to do this?


Unless I'm wrong, a file creation date is not a standard unix concept.
This is implemented at the HFS filesystem level.
So, you would have to resort to a tool like SetFile(1).

But I don't remember if that command is installed by default or with Developer Tools (sorry, XCode Tools).

Anyway, something like this:

do shell script "SetFile -d '04/01/2004 10:00:00' /path/to/somefile"

would set somefile's creation date to April 1st, 2004 at 10:00.

Of course, using this from AppleScript would very likely involve some date formatting as well as conversions from MacOS file paths to unix ones.

Should it be needed, don't hesitate to ask the list for such matters.

HTH,
Axel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Change of file creation date
      • From: Gnarlodious <email@hidden>
    • Re: Change of file creation date
      • From: Axel Luttgens <email@hidden>
References: 
 >Change of file creation date (From: Heinrich Bjerregaard <email@hidden>)

  • Prev by Date: Re: Starting a process when Mail starts - possible?
  • Next by Date: Re: Change of file creation date
  • Previous by thread: Change of file creation date
  • Next by thread: Re: Change of file creation date
  • Index(es):
    • Date
    • Thread