• 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
Re: file with most recent modification date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >file with most recent modification date (From: Robert Poland <email@hidden>)
 >Re: file with most recent modification date (From: Luther Fuller <email@hidden>)
 >Re: file with most recent modification date (From: Robert Poland <email@hidden>)
 >Re: file with most recent modification date (From: Shane Stanley <email@hidden>)
 >Re: file with most recent modification date (From: Shane Stanley <email@hidden>)
 >Re: file with most recent modification date (From: Emmanuel LEVY <email@hidden>)
 >Re: file with most recent modification date (From: Shane Stanley <email@hidden>)
 >Re: file with most recent modification date (From: John <email@hidden>)

  • Prev by Date: Re: file with most recent modification date
  • Next by Date: Re: AppleScript Reference Library
  • Previous by thread: Re: file with most recent modification date
  • Next by thread: Re: file with most recent modification date
  • Index(es):
    • Date
    • Thread