Want to create new folder on startup disk

I want to create a new folder on the startup disk but this code is not working…

set homename to (path to startup disk as string)
set newpathname to POSIX path of homename as string
set new_folder to (make new folder at newpathname with properties {name:“MyFolder”}) as alias

Any ideas on what I am doing wrong here?

It’s easier than all that. Try this…


tell application "Finder" to make new folder at startup disk with properties {name:"ddd"}

or if you need to put it into a variable for later reference


tell application "Finder" to set myFolder to make new folder at startup disk with properties {name:"ddd"}

If you need it as an alias…


tell application "Finder" to set myFolder to (make new folder at startup disk with properties {name:"ddd"}) as alias

Of course, you can put this in a full tell/end tell block if you want to do other things with the Finder.

Have fun,
Jim Neumann
BLUEFROG

If it is not sufficient for you, then describe what you want to do.
Regards
Rajeev