Post

Replies

Boosts

Views

Activity

Reply to Applescript create folder with properties
This solved the problem: The problem is nameOfFolder is an NSString object, you have to bridge it to AppleScript by coercing it to text: AppleScript make new folder at folderDestination with properties {name:nameOfFolder as text} But since you are already in the Cocoa world it would be more efficient to create the folder with NSFileManager. AppleScript on startButton:sender set folderDestination to POSIX path of (choose folder) log folderDestination log nameOfFolder set fileManager to current application's NSFileManager's defaultManager() set {success, fmError} to fileManager's createDirectoryAtPath:(folderDestination & nameOfFolder as text) withIntermediateDirectories:false attributes:(missing value) |error|:(reference) if success is false then log fmError's localizedDescription() end startButton: Here on stack overflow: https://stackoverflow.com/questions/66613102/applescript-create-folder-with-properties/66613251#66613251
Mar ’21