Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
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