Re: file with most recent modification date
Re: file with most recent modification date
- Subject: Re: file with most recent modification date
- From: Shane Stanley <email@hidden>
- Date: Wed, 27 Nov 2013 09:00:55 +1100
On 27 Nov 2013, at 1:45 AM, John <email@hidden> wrote:
> This is what I use to recursively sort files...
> set folderPath to POSIX path of (choose folder)
>
> set latestFiles to paragraphs of (do shell script "find " & quoted form of folderPath & " -type f -flags nohidden \\! -name \".*\" -exec stat -f \"%Sm - %N\" -t \"%Y-%m-%d %H:%M:%S\" {} + | sort -r ;")
But that still doesn't recognise packages -- it sees them as directories and ignores them. And it actually takes a fraction longer than the script I posted, not that that particularly matters.
Mac OS is built on top of Unix, and that means we get lots of great Unix utilities. But Mac OS is a sort of Unix-plus, and a lot of utilities are obviously not designed for that.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
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