Name

choose file name

Synopsis

file save dialog

file save dialog

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 specifies an existing file, goes through the usual "Replace?" rigmarole. You can set the initial folder, the initial filename, and the prompt. Returns a file URL (which appears as a file specifier). 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, 2nd Edition 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.