Applescript for creating a new folder

Trevor DeVore lists at mangomultimedia.com
Wed Jul 9 10:38:01 EDT 2003


On 7/9/03 Yves COPPE wrote

>
>Le mercredi, 9 juil 2003,  20:34 Europe/Brussels, Trevor DeVore a 
>crit :
>
>>
>> I think your syntax might be incorrect.  Try:
>>
>> tell application "Finder"
>>     make new folder at "HD Macintosh:users:<myname>:test" with 
>> properties {name:"testing"}
>> end tell
>>
>we are further but
>the folder is ALWAYS created on the desktop of the user.. the pathway 
>is not respected

Does the folder 'test' already exist?  If not then that causes problems with the above script.

You can check if a folder exists like this:

tell application "Finder"
    if not ("Macintosh HD:users:tdevore:tst" exists) then
        make new folder at "Macintosh HD:users:tdevore" with properties {name:"tst"}
    end if
    make new folder at "Macintosh HD:users:tdevore:tst" with properties {name:"tsting"}
end tell

Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com


More information about the use-livecode mailing list