title: Applescript: Highlight most recent file from group
body: <p>I'd like to know how you'd go about creating an action where you could highlight a group of files and get the modification date from them, then have it highlight/select/label the file with the most recent date.</p>
  
  <p>UPDATE: I want to do it on Applescript because I've gotten further in that. Here's what I have so far</p>
  
  <pre><code>set dateList to {}
  tell application "Finder"
      set inputList to get selection
      repeat with i from 1 to count (inputList)
          set end of dateList to get modification date of item i of inputList
      end repeat
  end tell
  
  dateList
  
  --Compare section...
  
  set boolList to {}
  set j to 1
  repeat with i from 1 to count (dateList)
      if i is (count (dateList)) then
          set j to 0
      end if
      set end of boolList to item i of dateList &gt; item (i + j) of dateList
  end repeat
  
  boolList
  </code></pre>