using "touch" in Leopard
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