It is very common to generate reoccurring reports in FileMaker that get saved to the user’s computer. Perhaps you would like to organize these reports by day or type. OS level folders and subfolders are a great way to do this. This demo file attached shows you how to create a folder and a subfolder on your user’s computer using FileMaker.
Here’s an overview on how the sample file works:
- The layout asks you to enter a folder name and a location for the folder (either desktop or documents folder). If the location is the same every time, you can hard code the location in your script.
- The script confirms that none of these values are empty.
- The subfolder name is calculated based on the date and time. This ensures that no two subfolders will have the same name, which would cause an error.
- Check if we are on Windows or Mac.
- If we are Windows, we run a Send Event script step that makes the directory specified.
- If we are on Mac, perform applescript to create the main folder, and then perform applescript again to create the subfolder.
- Let the user know if there was an error or if everything was successful.
You can download the demo file here: CreateFolders.fmp12 (Original File)
Paul McCudden from Peak 14 Solutions has enhanced the file to include parameters in order to account for custom file paths: CreateFolder_PaulMcCudden