Re: Permissions problem mac OS X 10.9.5 server
Re: Permissions problem mac OS X 10.9.5 server
- Subject: Re: Permissions problem mac OS X 10.9.5 server
- From: Yvan KOENIG <email@hidden>
- Date: Thu, 15 Jun 2017 16:11:18 +0200
> Le 14 juin 2017 à 20:48, Jim Weisbin <email@hidden> a écrit :
>
> I have a pretty simple script that sets the modification date of a folder (or
> multiple folders dragged on) to it’s creation date.
>
> The reason for it is that restores done from Crashplan don’t preserve mod
> dates, so this seemed like the best way to at least get them into some usable
> date order - my users tend to sort by date modified.
>
> The script runs fine on my laptop, running OS 10.12.5, accessing local files.
> It also runs fine when run from my laptop, accessing the files on a server
> remotely, via AFP. The server is running OS X 10.9.5.
>
> But when I try to run the script on the server, logged in as the
> administrator, it bombs at the line set this_item's modification date to
> theCreationDate
>
> With this error:
>
> error "Finder got an error: The operation can’t be completed because you
> don’t have the necessary permission." number -5000
>
> on open these_items
> tell application "Finder"
> repeat with i from 1 to the count of these_items
>
> set this_item to (item i of these_items)
> if kind of this_item is "Folder" then
> set theCreationDate to creation date of
> this_item
> -- display dialog theCreationDate as string
> set this_item's modification date to
> theCreationDate
> end if
> end repeat
> end tell
> end open
>
> I’m certain that the admin has the permissions to modify these folders. Is it
> a limitation of OS X 10.9.5?
>
> I think I could do this with SetFile, but this solution seemed to be the
> easiest and quickest to write.
>
As far as I remember, Applescript may change a modification date but can't
change a creation one.
Yvan KOENIG running Sierra 10.12.5 in French (VALLAURIS, France) jeudi 15 juin
2017 16:11:13
_______________________________________________
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