AS_Folder_Create ( myPath ; myOptions )
create folders using AppleScript and shell command mkdir (Apple only)
Average rating: 4.5 (22 votes) Log in to vote
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Creation of Folders using the shell command "mkdir"
U shall use a standard POSIX path or a common FileMaker paths like:
"filemac:" & Get ( DesktopPath ) & "my Folder/myFolder2/"
The script removes prefixes like "filemac:" or the name of the start volume like "/Macintosh HD/" automatically.
Use the ScriptStep "Perform AppleScript" using the option "Calculated AppleScript"
You also shall use "Perform AppleScript" directly from a button.
Set the file permission bits of the final created directory to
the specified mode. The mode argument can be in any of the for-
mats specified to the chmod(1) command. If a symbolic mode is
specified, the operation characters ``+'' and ``-'' are inter-
preted relative to an initial mode of ``a=rwx''.
-p Create intermediate directories as required. If this option is
not specified, the full path prefix of each operand must already
exist. On the other hand, with this option specified, no error
will be reported if a directory given as an operand already
exists. Intermediate directories are created with permission
bits of rwxrwxrwx (0777) as modified by the current umask, plus
write and search permission for the owner.
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.