• 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
using "touch" in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using "touch" in Leopard


  • Subject: using "touch" in Leopard
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 26 Mar 2008 15:36:47 +0100

Hello

In the past it was difficult to change the creation date of a file.

Is there somewhere a description of the changes made to the touch command?

Under Leopard, it changes the creation date.

Here is a sample script grabbed on a French AppleScript's forum.:

on open theseItems
set theDate to "200801261012.51"
repeat with i from 1 to the count of theseItems
set thisItem to (item i of theseItems)
tell application "System Events" to set dateMod to modification date of file thisItem
do shell script "touch -t " & theDate & space & (quoted form of POSIX path of thisItem)
tell application "System Events" to set modification date of file thisItem to dateMod
end repeat
end open


I added the instructions linked to the modification date because touch changed the creation AND the modification date if the new date is older that the in use one.

Yvan KOENIG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: using "touch" in Leopard
      • From: Luther Fuller <email@hidden>
  • Prev by Date: GUI scripting FileMaker Pro Advanced
  • Next by Date: Re: iTunes multiple changes without repeat? Speeding up things.
  • Previous by thread: Re: GUI scripting FileMaker Pro Advanced
  • Next by thread: Re: using "touch" in Leopard
  • Index(es):
    • Date
    • Thread