• 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: Message -ID, email@hidden, Back and forth between Posix and HFS paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths


  • Subject: Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
  • From: Cosgrave Valentine <email@hidden>
  • Date: Tue, 30 Mar 2010 00:39:20 +0100

Mark's last seems to have done the job.

do shell script "perl -MFile::Find -le 'find(sub { return if -d || $_\neq \".DS_Store\"; $mtime = (lstat $_)[9]; $newest =\n[$File::Find::name, $mtime] if !$newest || $mtime > $newest->[1]; },\nshift);  print $newest->[0]' " & (quoted form of POSIX path of myFolder)

Thrilled.

Much appreciated.

Val



I had been preparing this email to spur a different approach

I came across a script in my search of the various threads.


set theList to (do shell script "/usr/bin/find " & quoted form of POSIX path of theFolder & " -type f ! -name '\\.*' -print0 | /usr/bin/xargs -0 /usr/bin/basename | /usr/bin/sort -df")

This returns the names of all the files (no folders) in the directory in paragraph format and in alphabetical order.  and is very fast.

Might there be a way to sort these in date modified  order ?

 Please be aware that my level of scripting could be described as high level plagiarism.

Val


 _______________________________________________
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: Message -ID, email@hidden, Back and forth between Posix and HFS paths
      • From: Cosgrave Valentine <email@hidden>
    • Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Message -ID, email@hidden, Back and forth between Posix and HFS paths (From: Cosgrave Valentine <email@hidden>)
 >Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths (From: Alex Zavatone <email@hidden>)
 >Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
  • Next by Date: Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
  • Previous by thread: Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
  • Next by thread: Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
  • Index(es):
    • Date
    • Thread