Processing sub-folders

Am attempting to write a something that will process sub folders.

However when I try to get the bolean back from the folder property I just get an AS error.

Is it me??(Again)

Or have I missed some thing crucial??

here is a simplifed version


tell application " finder"
set my_file to choose file
set the_info to the info for my_file
set the item_type to folder of the_info
end tell

I expect to get back the true or false but just get this error.

Thanks in advance folks
Steve

The Finder has its own definition of ‘folder’ so it is confused when you use ‘folder’ with the ‘info for’ command from Standard Additions. Try this:

set my_file to choose file
set the_info to the info for my_file
set the item_type to folder of the_info

– Rob

Sorry Rob, you did’y make yourself clear:

Rob

It is official!!

I am a moron!!

Thanks for you help, again.

Steve