Re: last modified file - how to catch?
Re: last modified file - how to catch?
- Subject: Re: last modified file - how to catch?
- From: Christopher Stone <email@hidden>
- Date: Mon, 07 Jul 2014 04:25:08 -0500
On Jul 06, 2014, at 20:08, Shane Stanley < email@hidden> wrote: Right, but your first script ignores packages as directories.
______________________________________________________________________
Hey Shane,
Oh, you mean like .app packages. Yes those will have the problem you describe, but that's easily overcome with a filter.
Is there a list anywhere of standard package types other than .app files on OSX? That doesn't show any invisibles here.
Odd -- here it includes:
document file ".DS_Store" of folder "Desktop" of folder "shane" of folder "Users" of startup disk of application "Finder"
I have invisibles set to show, but as far as I know, Finder scripting always ignored that setting. I wonder when it changed.
------------------------------------------------------------------------------------------- set _fldr to alias ((path to downloads folder as text) & "2014.05.21 · 23.57.46 { Gathered }:") tell application id "com.apple.finder" set fileList to (sort files of _fldr by modification date) repeat with i in fileList set contents of i to i as alias end repeat end tell fileList -------------------------------------------------------------------------------------------
Invisibles OFF in the Finder:
{ "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:ASObjCExtras_stuff.zip", "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:MailFollowUp 1.6.4.dmg", "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:Safari 7.0.4 Mavericks.pkg", "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:Dilbert { 2014.05.21 }.gif", "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:Cytozyme-Trachea { Mesenchyme }.odt" }
Invisibles ON in the Finder:
{ "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:ASObjCExtras_stuff.zip", "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:MailFollowUp 1.6.4.dmg", "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:Safari 7.0.4 Mavericks.pkg", "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:Dilbert { 2014.05.21 }.gif", "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:Cytozyme-Trachea { Mesenchyme }.odt", "Ryoko:Users:chris:Downloads:2014.05.21 · 23.57.46 { Gathered }:.DS_Store" }
It would seem this has changed, but I've never run with invisibles ON in the Finder and will have to take your word for it.
-- Take Care, Chris
|
_______________________________________________
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