MAC OS X Problems
Scott Rossi
scott at tactilemedia.com
Tue Jul 8 22:50:01 EDT 2003
On 7/8/03 11:41 PM, "Yves COPPE" <yvescoppe at skynet.be> wrote:
>> on mouseUp
>> set itemDel to "/"
>> put item 1 to -2 of the filename of this stack into mypath
>> create folder (myPath & "/newuserfolder")
>> rename folder (myPath & "/newuserfolder") to (myPath & "/")
>> end mouseUp
>>
>> Works fine here...
>>
>> Regards,
>>
>> Scott Rossi
>> Creative Director
>> Tactile Media, Multimedia & Design
>>
>
> It doesn't work if in your path you have an existing folder wtih
> diacriticals
>
> f. ex.
> myPath is /users/<myName>/xxx/yyy/
>
> then
> add your code
>
>> create folder (myPath & "/newuserfolder")
>> rename folder (myPath & "/newuserfolder") to (myPath & "/")
>>
>
> it won't work !!!!
I can get this to work using the directory property and relative paths.
on mouseUp
# START WITH FOLDER NAME
put "" into tName
# ESTABLISH THE BASE PATH
# ALWAYS DO THIS BEFORE CREATING ANY FOLDER
set itemDel to "/"
put item 1 to -2 of the filename of this stack into mypath
set the directory to mypath
# OPTION 1 - CREATE FOLDER IN SAME DIRECTORY AS STACK
create folder "newuserfolder"
rename folder "newuserfolder" to tName
# OPTION 2 - CREATE NEW FOLDER ONE FOLDER UP IN HIERARCHY
set the directory to "../"
create folder "newuserfolder"
rename folder "newuserfolder" to tName
# OPTION 3 - CREATE FOLDER TWO FOLDERS UP IN HIERARCHY
set the directory to "../"
create folder "newuserfolder"
rename folder "newuserfolder" to tName
end mouseUp
Regards,
Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com
More information about the use-livecode
mailing list