Return file list sorted by modification date instead of alphabetically
Return file list sorted by modification date instead of alphabetically
- Subject: Return file list sorted by modification date instead of alphabetically
- From: Bert Groeneveld <email@hidden>
- Date: Wed, 12 Mar 2014 16:06:23 +0100
Thanks to Mark J. Reed I have following very, very powerful piece of code:set all_the_Hires_Images to paragraphs of (do shell script "cd " & qp & "&& find . -type f -print | sed -e 's,.*/,,'")
I use it this way: set the_ImagePath_folder to choose folder with prompt "Choose Hires Folder" set qp to quoted form of POSIX path of the_ImagePath_folder set all_the_Hires_Images to paragraphs of (do shell script "cd " & qp & "&& find . -type f -print | sed -e 's,.*/,,'") (* Finder alternative (much slower) tell application "Finder" set all_the_Hires_Images to name of every file of entire contents of the_ImagePath_folder end tell *) This script returns a list (sorted alphabetically) of the NAMES all files inside a certain highres folder. So far so good.
What I need now is the same list, but than sorted by modification date with the newest files first (instead of sorted alphabetically). Is someone able to help me and edit Mark's code? I am unable to figure this out myself.
Thank you for any help, Bert. |
_______________________________________________
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