Create a file: Difference between revisions

m
Line 75:
AppleScript itself has limited built-in File System access, but folders (directories) can be created by controlling the Mac OS Finder, and files can be created and accessed using the Standard Additions (osax) scripting addition included with AppleScript. Also, the Finder has no concept of the working directory (as it is a GUI). You can however target the frontmost Finder window that is open.
 
Create a zero-byte text file on the startup disk (root directory). Note: the <code>close</code> command is a memory allocation housekeeping command that should be performed once file access is complete.
<lang AppleScript >close (open for access "output.txt")</lang>
Create a new folder (directory) on the startup disk (root directory).
Anonymous user