Re: Can't get every document file of every folder of startup disk whose creator type = "MSIE"
Re: Can't get every document file of every folder of startup disk whose creator type = "MSIE"
- Subject: Re: Can't get every document file of every folder of startup disk whose creator type = "MSIE"
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 18 Dec 2006 23:15:18 -0500
On 12/18/06, Matthew Smith <email@hidden> wrote:
mdfind "kMDItemFSCreatorCode == 1297303877"
For some reason you have to give the decimal value for the creator code and
not the 4-character code. Perhaps you can use the hex value instead.
Yes, you can - using the C convention of prefixing 0x to indicate hex.
That's a lot easier for me since I can turn letters into ASCII codes
in my head, and I don't have to do any multiplying-and-shifting like
you do to get the decimal version. Seems like they would support some
way to just type the four characters in the query, but darned if I
could find it (or, for that matter, any documentation on the query
syntax. mdfind doesn't exactly have the most informative man page.)
Anyway, MSIE is 0x4d534945 - the uppercase letters start with hex 0x41
and count up from there. M is the 13th letter of the alphabet, which
is d in hex, so 'M' is 0x4d. S is the 19th letter, which is hex 13,
so 'S' is 0x40 + 0x13 = 0x53. I is the 9th letter -> 0x49, and E is
the 5th -> 0x45. Lowercase works the same way but starting with 0x61,
so if it were "msie" the hex would be 0x6d736965.)
--
Mark J. Reed <email@hidden>
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden