Re: More 9.1 Problems

From: Joe Barwell (jbar@ES.CO.NZ)
Date: Mon May 21 2001 - 20:24:04 AEST


On Mon, 21 May 2001, Roy McCoy <roy@LUNA.NL> wrote:

>Paul Berkowitz wrote:
>
>> The 'entire contents' property has always been buggy. You can't use it
>> on folders with lots of subfolders.

No, "entire contents" has not always been buggy.  It works fine for
systems prior to 8.0.

>I could get {alias " Great Royzito:Test Folder:Test File 1.htm", alias
>" Great Royzito:Test Folder:Test File 2.htm", alias " Great Royzito:Test
>Folder:Test File 3.html", alias " Great Royzito:Test Folder:Test File
>4.html"}, but I couldn't do anything practical with the list items.
>Specifically, I couldn't change the creator type of the files with names
>ending in "htm" or "html" to "R*ch". I've missed, forgotten, or never
>learned something, but I don't know what it is. Starting from such a
>returned list, how do I (1) test for "htm" or "html" in the file name,
>and (2) get "set creator type of [???] to "R*ch"" to work?

Not sure how to do this with fly-speck-Akua, but using Tanaka's osax,
this seems to work:

set f to choose folder
set l to MT List Files f of type "TEXT" name contains ".htm" return
as alias with sub folders
MT Change File Info l creator type "R*ch"

Note that it is slightly imprecise in that a filename may contain the
target string other than at the end, as you desire.  Using a Finder
"whose"-type clause would be more precise (the following is all one
line, assuming the first line of the preceding example):

tell application "Finder" to set creator type of every file of entire
contents of folder f whose file type is "TEXT" and name ends with
".htm" or name ends with ".html" to "R*ch"

>David Livesay wrote:
>
>> There's a utility called Drop*BB that ships with BBEdit.
[snip]

>Yeah, that worked perfectly and took all of two seconds. I guess I'm a
>masochist for trying to script it anyway, even figuring that the utility
>would work. Thanks.

Masochjst or Sadjst?

Selected from Ambrose Bierce's "Devil's Dictionary":
PREVARICATOR, n. -- A liar in the caterpillar estate.

------------------------------



This archive was generated by hypermail 2b29 : Sun May 27 2001 - 12:00:29 AEST