Name
choose file name — file save dialog
Description
Puts up a standard Save File dialog (default button “Save”), with title “Choose File Name” and default prompt “Specify new file name and location”. The user can also create a new folder. If the user types the name of an existing file, goes through the usual “Replace?” rigmarole. Returns a file URL (which appears as a file specifier). If the user cancels, an error is thrown (-128: “User canceled.”) Does not actually save anything.
Example
set f to choose file name with prompt "Where shall I save this stuff?"
Get AppleScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.