Re: Kind of HTML files
Re: Kind of HTML files
- Subject: Re: Kind of HTML files
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 18 Oct 2006 15:50:31 +0200
Le 18 oct. 2006 à 15:32, has a écrit :
Yvan KOENIG wrote:
I am unable to find which is the exact wording of the property kind
for an HTML file.
The french Finder returns "Document HTML".
I assumes that the english one returns "HTML Document" but I am not
sure of that.
The kind property in Finder's item class contains a localised
description. If you're on 10.4, use System Events or Standard
Additions to check the file's uniform type identifer, e.g.:
tell application "System Events"
get every file of someFolder whose type identifier is
"public.html"
end
For more info on UTIs, see <http://developer.apple.com/macosx/
uniformtypeidentifiers.html> and the follow the links at the bottom
of the page.
If you're not on 10.4, I think you'll need to make up a list of all
possible name extensions and test against that.
Hello
For info, I coded this way:
set htmlFlag to (file type of element is "html") or ¬
(name extension of element is in {"html", "htm"}) or ¬
(type identifier of (info for element) is "public.html") or ¬
(kind of element is in {"Document HTML", "HTML Document"})
I just wished to get rid of the type identifier which nead to code
this way .
I hoped to be able to code:
tell application "Finder" to set listeHTML to ¬
every file of thisFolder whose (file type of element is "html") or ¬
(name extension of element is in {"html", "htm"}) or ¬
(kind of element is in {"Document HTML", "HTML Document"})
because i feel unable to put the test upon type identifier in this
late instruction.
Yvan KOENIG _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden