Re: Tell Finder Make New Folder wierdness!

From: David Livesay (dlivesay@MAC.COM)
Date: Wed May 23 2001 - 13:37:42 AEST


'Twas 5/22/2001 6:21 PM when Roderick Scott Corporation did write:

>I hope someone can help me. I'm trying to write a handler that will
>crawl a folder path and verify the existence of the path, making new
>folders as necessary to fulfill the path.

set pathToBuild to "Test Folder:Test Folder:Test Folder:Test Folder:"
set theRoot to path to startup disk as string
set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set folderList to text items 1 through -2 of pathToBuild
set AppleScript's text item delimiters to tid
tell application "Finder"
        repeat with i in folderList
                set thePath to theRoot & i & ":"
                if not (exists folder thePath) then make new folder at folder theRoot =
=AC
                        with properties {name:i}
                set theRoot to thePath
        end repeat
end tell


Dave
--
"A Jedi's strength flows from The Source. But beware of the dark side.
COM... DCOM... VB... ActiveX... ADO... ASP... .NET.... The dark side of
The Source are they. Easily they flow, quick to join you in a project. If
once you start down the dark path, forever will it dominate your destiny,
consume you it will."

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



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