AppleScript: Using Folder Actions to Sync Folders

AppleScript is so fun! That and Folder Actions are two of the reasons I love OS X.

So I recently had something come up where I had to make sure anything that was copied into one folder was immediately copied into another. Folder Actions made this simple.. now I haven’t added the functionality to make sure that anything that’s deleted from the master folder gets deleted in the Sync Folder but this script is good enough.

I saved this code as an .scpt file in /Library/Scripts/Folder Action Scripts, attached it to a folder and I was set.

Chrissy is a Cloud and Datacenter Management & Data Platform MVP who has worked in IT for over 20 years. She is the creator of the popular SQL PowerShell module dbatools, holds a master's degree in Systems Engineering and is coauthor of Learn dbatools in a Month of Lunches. Chrissy is certified in SQL Server, Linux, SharePoint and network security. You can follow her on Twitter at @cl.

Posted in OS X & iPhone
3 comments on “AppleScript: Using Folder Actions to Sync Folders
  1. anthony says:

    does this include the folder's sub folders???

  2. quaid says:

    want it to work but get expected end of line but found unknown token from the do shell script line

  3. brian says:

    syntax error in do shell script line “expected end of line”

Leave a Reply

Your email address will not be published. Required fields are marked *