Re: Modification Date of Folder
Re: Modification Date of Folder
- Subject: Re: Modification Date of Folder
- From: Michael Terry <email@hidden>
- Date: Sat, 7 Feb 2004 10:32:42 -0800
On Feb 7, 2004, at 9:38 AM, Irwin Poche wrote:
While this isn't a Applescript issue, it may have an Applescript
solution.
Modifying a file does not set the modification date of its enclosing
folder or the values returned by Applescript's modification date.
I tried doing a Finder Get Info command and that will correct the
modification date that Applescript returns.
Is there a way to have the date updated prior to using "modification
date" and without actually having Applescript do a Finder Get Info
command?
------------------------------------------------------------------------
---
--> modify the file here <--
------------------------------------------------------------------------
---
set {theFile, itsFolder} to {choose file, choose folder}
display dialog modTimes(a reference to theFile, a reference to
itsFolder)
tell application "Finder" to update itsFolder
display dialog modTimes(a reference to theFile, a reference to
itsFolder)
on modTimes(theFile, itsFolder)
tell application "Finder"
return "TARGET FILE:
Finder: " & time string of (get modification date of theFile) & "
Info for: " & time string of modification date of (info for theFile) & "
PARENT FOLDER:
Info for: " & time string of modification date of (info for itsFolder)
& "
Finder: " & time string of (get modification date of itsFolder)
end tell
end modTimes
Mike
_______________________________________________
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.