• 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: last modified file - how to catch?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: last modified file - how to catch?


  • Subject: Re: last modified file - how to catch?
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 07 Jul 2014 10:29:24 +1000

On 7 Jul 2014, at 10:09 am, Christopher Stone <email@hidden> wrote:

A faster method is:

-------------------------------------------------------------------------------------------
set _path to POSIX path of (path to downloads folder as text)
set lastModifiedFile to first paragraph of (do shell script "ls -Ft " & quoted form of _path & " | sed -E '/\\/$/d'")
-------------------------------------------------------------------------------------------

Except it unfortunately fails when there are package files involved.

I also note that on my Mac (10.9.4) the Finder seems to be including .DSStore files in my example (which is essentially the same as yours).

-- 
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

  • Follow-Ups:
    • Re: last modified file - how to catch?
      • From: Shane Stanley <email@hidden>
    • Re: last modified file - how to catch?
      • From: Christopher Stone <email@hidden>
References: 
 >last modified file - how to catch? (From: okn <email@hidden>)
 >Re: last modified file - how to catch? (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: last modified file - how to catch?
  • Next by Date: Re: last modified file - how to catch?
  • Previous by thread: Re: last modified file - how to catch?
  • Next by thread: Re: last modified file - how to catch?
  • Index(es):
    • Date
    • Thread