Re: List of all applications
Re: List of all applications
- Subject: Re: List of all applications
- From: Bruce Robertson <email@hidden>
- Date: Sun, 20 Feb 2011 15:28:12 -0800
On Feb 20, 2011, at 10:33 AM, Christopher Stone wrote:
> On Feb 20, 2011, at 12:03, Bruce Robertson wrote:
>> Any way to get this to work with subfolders?
>> I have my FileMaker versions in a subfolder FileMaker Apps and I do not get results for those apps.
> ______________________________________________________________________
>
> Hey Bruce,
>
> It already dives into subs. I'm not aware that there is any analog of 'find's '-depth' filter to stop it from doing so. As far as I know you only have control of the starting point.
>
> You do note the time constraint of 'used in the last 3600 seconds'. What happens when you change that?
>
> Scope out the last-used-date on the apps that aren't showing up, adjust the time, and see what happens.
>
> This will grab the 'kMDItemLastUsedDate' attribute of the selected item in the Finder and display it in the result viewer:
>
> tell application "Finder"
> try
> set sel to selection as alias list
> if sel ≠ {} then
> set sel to sel's item 1
> set sel to POSIX path of sel
> set sel to quoted form of sel
> set cmd to "mdls -name kMDItemLastUsedDate " & sel
> set mdlsOutput to do shell script cmd
> end if
> on error errMsg number errNum
> set sep to "=============================="
> set e to sep & return & "Error: " & errMsg & return & sep & return ¬
> & "Error Number: " & errNum & return & sep
> beep
> display dialog e
> end try
> end tell
>
> --
> Best Regards,
> Chris
______________________________________________________________________
Sorry; but no, "-onlyin" actually does not work as you expect. That is, it does NOT walk subfolders beyond 1 folder depth.
test 1:
mdfind -onlyin /Applications/ 'kMDItemLastUsedDate > $time.now(-86400)' | egrep -i "\.app$" > ~/desktop/apps1.txt
test 2:
mdfind 'kMDItemLastUsedDate > $time.now(-86400)' | egrep -i "\.app$" > ~/desktop/apps2.txt
Result 1:
/Applications/Calculator.app
/Applications/iCal.app
/Applications/DragThing.app
/Applications/radioSHARK.app
/Applications/QFinder.app
/Applications/Safari.app
/Applications/QGet.app
/Applications/TextEdit.app
/Applications/Utilities/Terminal.app
/Applications/Utilities/AppleScript Editor.app
/Applications/Utilities/Activity Monitor.app
/Applications/Tex-Edit Plus 4.9.7/Tex-Edit Plus.app
/Applications/ScanSnap/ScanSnap Manager.app
/Applications/ScanSnap/OnlineUpdate.app
/Applications/ScanSnap/Sub/SSMagAdjust.app
/Applications/ScanSnap/Sub/RegistScanSnap.app
/Applications/ScanSnap/Sub/SSLog.app
/Applications/ScanSnap/Scan to Office/Scan to E-mail.app
/Applications/ScanSnap/Scan to Office/Scan to Folder.app
/Applications/ScanSnap/Scan to Office/Scan to Print.app
Result 2:
/Applications/Utilities/Terminal.app
/Applications/Tex-Edit Plus 4.9.7/Tex-Edit Plus.app
/Applications/Utilities/AppleScript Editor.app
/Applications/FileMaker Apps/FileMaker Pro 9 Advanced/FileMaker Pro Advanced.app
/Applications/ScanSnap/Sub/SSMagAdjust.app
/Applications/ScanSnap/Sub/SSLog.app
/Applications/ScanSnap/Sub/RegistScanSnap.app
/Applications/ScanSnap/Scan to Office/Scan to Print.app
/Applications/ScanSnap/Scan to Office/Scan to Folder.app
/Applications/ScanSnap/Scan to Office/Scan to E-mail.app
/Applications/ScanSnap/OnlineUpdate.app
/Applications/ScanSnap/ScanSnap Manager.app
/Applications/Safari.app
/Applications/FileMaker Apps/FileMaker Pro 11 Advanced/FileMaker Pro Advanced.app
/Applications/QFinder.app
/Applications/QGet.app
/System/Library/CoreServices/Archive Utility.app
/Applications/Utilities/Activity Monitor.app
/Applications/TextEdit.app
/Applications/DragThing.app
/Applications/Calculator.app
/Applications/radioSHARK.app
/Applications/iCal.app
_______________________________________________
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