2
votes

I am trying to create a new folder on a server with a name that was taken from the user. Here is what I have so far

display dialog "Please enter your augnet username" default answer "username"
set username to (text returned of result)

mount volume "smb://orgs.augsburg.edu"

tell application "Finder"
    make new folder at "orgs.augsburg.edu/Information Technology/www/kb_images/Migration Testing" with properties {name:username}
end tell

I am getting an error saying "cannot make into type item" any help is much appreciated. Thanks!

1
Does it say what line the error is on? I don't see an "item" but a "folder".Celeritas

1 Answers

0
votes

You have an error because :

1 - The type of this path is "posix path", the Finder does not recognize this type, slashes should be replaced by colons

2- You must specify the class (folder, files, disk, ...) when you use a string (the path) in the Finder

display dialog "Please enter your augnet username" default answer "username"
set username to (text returned of result)

mount volume "smb://orgs.augsburg.edu"
tell application "Finder"
    make new folder at folder "orgs.augsburg.edu:Information Technology:www:kb_images:Migration Testing:" with properties {name:username}
end tell