Re: mdls & .app?
Re: mdls & .app?
- Subject: Re: mdls & .app?
- From: "Nigel Garvey" <email@hidden>
- Date: Sun, 20 Feb 2011 23:00:43 +0000
[This hasn't appeared in the Web archive a couple of hours after I sent
it, so I'm posting it again. Apologies for any duplication.]
Christopher Stone wrote on Sun, 20 Feb 2011 09:22:37 -0600:
>On Feb 20, 2011, at 02:44, Steve Thompson wrote:
>> On 20 Feb 2011, at 03:36, Christopher Stone wrote:
>>> # Does not work:
>>> set theApp to "/Applications/TextEdit.app"
>>> set cmd to "mdls " & theApp
>>> do shell script cmd
>The output I would expect from: 'mdls /Applications/TextEdit.app' is
>similar to this which comes from a test text file in the Applications
>Folder:
This is a bit Heath Robinson, but does it help?
-- set theApp to quoted form of "/Applications/Longish text.txt"
set theApp to quoted form of "/Applications/TextEdit.app"
-- mdls a file whose path is either the one provided
-- or begins with the one provided and contains "/MacOS/".
set cmd to "file=$(find -f " & theApp & " \\( -type f -and \\( -path
" & theApp & " -or -path '*/MacOS/*' \\) \\)) ; mdls \"$file\""
do shell script cmd
NG
_______________________________________________
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