Error creating folder

I used to run the following script in Mac OS X 10.3. But it is not working in 10.4. I’m getting the following error message.

Erreur in Finder : Il est impossible de rendre “Volumes:Shared:Test:123” en type item.

property source_folder : “Volumes:Shared:Test:”
set creation_rep_creation to “123” as string
set supression_rep_supression to “456” as string

tell application “Finder”
activate
set folder_creation to source_folder & creation_rep_creation
display dialog folder_creation
if not (exists folder folder_creation) then
make new folder at folder_creation with properties {name:creation_rep_creation}
logData("Création du répertoire: " & creation_rep_creation & “.” & return) of me
end if
set folder_supression to source_folder & supression_rep_supression
if (exists folder folder_supression) then
delete folder_supression
logData("Supression du répertoire: " & supression_rep_supression & “.” & return) of me
end if
end tell

Thank you for helping

Hi,

maybe Panther is more user-fault-tolerant :wink:

You’re trying to make a new folder in a literal string, not in a folder, add the keyword folder


.
make new folder at folder folder_creation with properties {name:creation_rep_creation}
.
delete folder folder_supression
.

Hello Stefan,

I tried and get the same result.

This cannot work


.
if not (exists folder folder_creation) then
		make new folder at folder folder_creation with properties {name:creation_rep_creation}
.

if the folder doesn’t exist, you can’t create a folder in an non existing folder (with the Finder)
do you mean this

.
if not (exists folder folder_creation) then
		make new folder at folder source_folder with properties {name:creation_rep_creation}
.

Working !!

Thank’s for your Help.

Louis