Applescript for creating a new folder
David Vaughan
dvk at dvkconsult.com.au
Wed Jul 9 19:33:00 EDT 2003
On Thursday, Jul 10, 2003, at 05:09 Australia/Sydney, Trevor DeVore
<lists at mangomultimedia.com> wrote:
>
> On 7/9/03 Yves COPPE wrote
>
>> Hi Trevor
>>
>>> You can check if a folder exists like this:
>>>
>>> tell application "Finder"
>>> if not ("Macintosh HD:Users:tdevore:tést" exists) then
>>> make new folder at "Macintosh HD:Users:tdevore" with
>>> properties {name:"tést"}
>>> end if
>>> make new folder at "Macintosh HD:Users:tdevore:tést" with
>>> properties {name:"tésting"}
>>> end tell
>>>
>>
>> It further create a folder on my desktop....
Yves
I am pleased you now have two working solutions. I have filed them away
for my own information. You may have a third in Trevor's above
suggestion as well. It worked for me when I tried it, so I did a little
bit of more testing, naming non-existent Volumes both in Applescript
and using Rev's create folder. Applescript gave an execution error but
with Rev the folder was still created but in the current default path,
which in your case may coincidentally have been your desktop.
No need to reply to this conjecture but it might be helpful in a future
case. Usually, if an experienced helper (e.g. Scott, not to mention
Trevor and others) says something works, it is because they have
already proven it to themselves, so it makes sense to look for other
possible differences in the testing.
regards
David
>
> Hmmmm. Désolé, mais I am no AppleScript expert (just barely learning)
> so I don't know what the problem is. It works here. Scott seemed to
> have a solution however.
>
> Trevor DeVore
> Blue Mango Multimedia
> trevor at mangomultimedia.com
More information about the use-livecode
mailing list