Mac Format

Syncing folders to a backup

- by Martin Tuck

QI used to sync key documents to a thumb drive, as an off-site backup. The app I used has now died, and I’m running High Sierra. Is there a better way to do this?

AThere are no less than three ways, depending on whether you enjoy writing AppleScrip­t or shell scripts, or prefer to use a simple pane in System Preference­s.

AppleScrip­t supports Folder Actions, scripts that run whenever something changes in a folder, such as adding a document to it. They’re now more fiddly to use, as you need to make the Script menu visible, which is done in Script Editor’s General prefs. (Script Editor is part of macOS, and located in /Applicatio­ns/Utilities.) You’ll need to write your own script to copy files from the watched folder to your thumb drive.

You can do the same in a shell script using the fswatch command (bit.ly/fswatch). Although powerful, these are not the simplest option.

Perhaps best for most of our readers is Hazel (about £24, noodlesoft.com). In its System Preference­s pane you can set folders to be watched, then define actions which run when conditions are met – but without the need to write more complex scripts. For example, it would be very simple to copy files added to a specific folder to your flash drive. Hazel does a great deal more beyond this, and can be used to automate workflows that are usually manual affairs.

 ??  ?? Building folder actions in Hazel requires no scripting or programmin­g, although it can run scripts you’ve written if you wish.
Building folder actions in Hazel requires no scripting or programmin­g, although it can run scripts you’ve written if you wish.

Newspapers in English

Newspapers from Australia