Re: folder of
Re: folder of
- Subject: Re: folder of
- From: email@hidden
- Date: Tue, 28 Nov 2000 12:29:49 EST
Glenn:
On the other hand, if you want to keep your "tell Finder" block, just ask the
finder to get the "kind" of the alias. In your script:
if kind of theFile is "folder" then...
My untested guess is that info for might be a tad faster than using Finder
commands, but if you're already in a "tell Finder" block it makes sense (to
me anyway) to let the Finder carry the mail.
Robert Kyle
Star Tribune
Minneapolis
In a message dated 11/27/00 12:25:42 PM, email@hidden writes:
>
>
Is anyone else having trouble with "folder of" to determine if
>
a file is a folder? In the following, I get an error that says:
>
"can't get folder of". The error message then lists the object
>
and clearly shows "folder:true". I can get other attributes such
>
as locked or alias, but folder doesn't work. I'm using MacOS 9.04.
>
>
>
on run
>
>
set myFolder to (choose folder with prompt ("select folder to process"))
>
processIt(myFolder)
>
>
end run
>
>
on processIt(myFolder)
>
tell application "Finder"
>
display dialog "Folder: " & myFolder
>
set myFolder to myFolder as alias
>
set myFolderContents to list folder myFolder
>
repeat with x in myFolderContents
>
set folderText to myFolder as text
>
set xText to x as text
>
set thePath to folderText & xText
>
set theFile to thePath as alias
>
if folder of (info for theFile) is true then
>
processIt(theFile)
>
end if
>
end repeat
>
end tell
>
end processIt