• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Folder Type Identifier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folder Type Identifier


  • Subject: Re: Folder Type Identifier
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 13 Oct 2015 22:16:00 +1100

On 13 Oct 2015, at 10:04 PM, Thomas Fischer <email@hidden> wrote:

I tried that (the lsregister is at
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
on my machine).

But to no avail, the type identifier as given by System Events remains "dyn.age8u".

That's very strange. I get "public.folder" here; UTI's beginning with "dyn." are usually dynamically generated when no entry is found in the database.

So what happens if you run this on the folder:

use scripting additions
use framework "Foundation"
set thePath to POSIX path of (path to home folder) -- or any other folder
set theNSURL to current application's class "NSURL"'s fileURLWithPath:thePath
set {theResult, theValue} to theNSURL's getResourceValue:(reference) forKey:(current application's NSURLTypeIdentifierKey) |error|:(missing value)
return theValue as text

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

References: 
 >Shell script to get a list of all subfolders inside a folder (From: Bert Groeneveld <email@hidden>)
 >Re: Folder Type Identifier (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Shell script to get a list of all subfolders inside a folder
  • Next by Date: Re: Shell script to get a list of all subfolders inside a folder
  • Previous by thread: Re: Folder Type Identifier
  • Next by thread: Re: Folder Type Identifier
  • Index(es):
    • Date
    • Thread