Brian Dunning's FileMaker Custom Functions

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

Thomas Siebert   Thomas Siebert - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
AS_Folder_Create ( "filemac:" & Get ( DesktopPath ) & "my Folder/myFolder2/" ; "-p" )
  Sample output:
creates 2 Nested folders on the desktop

  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.


-m mode
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.



Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: