Application icon

Sync Files

 

Many users have two or more activate copies of their audio files. Sometimes the copy is a one-to-one copy and sometimes the audio files are encoded differently.

These actions provide a means of syncing any changes to the metadata in the originals to a copy. The sync trigger is simple ... the two files have different modification dates. When a sync occurs, metadata is copied from the source file to the destination file.

Note that the process does not mirror the data ... they only ensure that the destination contains everything at the source.

These actions only work if filenames and folder structures under the roots are exactly the same. For example if you are syncing /Users/Me/Music to /Volumes/Music/Copy, the following files are a match:

/Users/Me/Music/John Doe/His Best/song.mp3
/Volumes/Music/Copy/John Doe/His Best/song.???

The filename extension on the second file is described as ??? as how files get matched is controlled by the actions.

Three actions are supplied:

Sync Files - Batch Processor
This is a background only action and should not be run directly.

Sync Files Utility
This is the main action which provides all the configurability.

Sync Files With Default Profile
The Sync Files Utility lets you create different profiles for different processes. This action runs the default profile without presenting any configuration options.

These actions let you optionally copy or convert the source files when the file at the destination is missing. When conversion is required, Permute 3 is used. Permute 3's automation via Yate was jointly designed. If you do not have Permute 3 on your Mac, the options to convert files will not be presented. These actions require Permute 3.6.3 or later.



Sync Files Utility

The first time you run this action you will be immediately prompted to create a profile.



New Profile Image

After entering a profile name and continuing, you will be presented with a panel requesting you to choose the root source folder. This is the folder which will be passed to the Batch Processor. All files in or under the chosen folder will be processed. Cancelling will restart the process.

Once you've chosen the source folder you will be prompted to select a root destination folder. This is the folder containing the files to be modified, if required. After selcting the destination folder, you will be presented with the following panel:



Source Extension Choice Image

If you want to sync all located audio files leave the field empty. Alternately you can successively choose a file type from the picker menu. Select Done when you are finished specifying the source audio types. If you make a mistake select Clear Selections from the menu. When done you will be presented with:



Source Extension Choice Image

The text about Premute 3 will not be displayed if the application cannot be found in the Applications folder. You only have to choose something from the picker control's menu if you are synching to different audio file types than in the source. If your libraries are copies nothing need be chosen. However if you are syncing from FLAC files to AIFF files, you must choose the appropriate destination extension (AIFF). The menu will contain items for Permute 3 if appropriate. The menu can look like:


Source Extension Choice Image

If you want to use Permute 3 to produce missing files you must choose one of the items beginning with Permute.

Do not choose a destination extension if the destination is a copy of the source. Only do so if the two libraries have different filename extensions on the audio files. Selecting a filename extension when unnecessary will disable the display of the following panel:



Copy Files Image

As mentioned, this panel is only displayed when no destination file extension has been chosen. Typically you would choose Yes to copy source files to the destination if they are missing.

You can decide what to do with non audio files and folders in each source folder containing audio files.



Non Audio Image

The menu contains the following choices:



Non Audio Menu Image
Never
Non audio files and folders are never copied to the destination.

If the destination folder did not exist
The destination folder is the folder corresponding to the source folder containing audio files currently being processed by the batch processor. If the destination folder had to be created, all non audio folders and contained folders which do not have an audio file as a descendent, will be copied. Note that the copied folder completely overwrites a preexisting folder of the same name.

If changes were made
Changes can be: creating the destination folder; copying a source folder; converting a source folder or synchronizing the metadata in a destination folder.

Always
An attempt is made to always copy the non audio files and folders.

Similarly you can opt to set the icon of the destination folder.



Non Audio Image

The menu contains the following choices:



Non Audio Menu Image
Never
Destination folder icons are never written.

If the destination folder did not exist
The destination folder is the folder corresponding to the source folder containing audio files currently being processed by the batch processor. If the destination folder had to be created, a folder icon will be written. When attempting to set the icon the following rule is used. The first artwork item in the first audio file in the source folder is the artwork which gets written. If there is no artwork available in the file, the destination folder will have its icon removed.

If changes were made
Changes can be: creating the destination folder; copying a source folder; converting a source folder or synchronizing the metadata in a destination folder.

Always
Destination folder icons are always written.

Congratulations, at this point you will have created your first profile. At this point you will see the next panel which will be displayed whenever you next start the action:



Main Panel Image

The name of the profile you just created will be displayed. When a profile name is displayed in the text field there are a number of functions you can perform. The most obvious is that you can run the process via the Run button. This will start the Batch Processor to do the work. If you have not enabled Preferences - Actions - Enable Batch Processor auto start from Stop Action and Run Batch Processsor, you will be presented with the Batch Processor's ready to go panel and you will have to hit Start. If the option is enabled, the Batch Processor will simply start.

Let's back up for a second. If you've chosen a Permute 3 setting for the destination filename extension and it's the first time you've use the required Permute 3 preset, the following panel will be displayed when you hit Run:



Permute Test Image

The displayed Permute 3 preset name depends on which destination type was chosen. If a preset has not been added in Permute 3, conversions will fail. Rather than get multiple error messages when running the Batch Processor, a test is performed once. Once the test has succeeded you will not see this panel again for the same preset name.

Let's go back to the main panel.



Main2 Panel Image

When this panel is displayed, you can perform various functions on the profile named in the text field. The menu displays functions at the top and the names of your defined profiles at the bottom. Here's a sample:



Main Menu Image

Here's a brief description for each function:

Display Profile Information
The parameters you set for the profile named in the text field will be displayed. You can choose to run the profile from the displayed panel or go back to the main panel.

Create New Profile
You will be stepped through the new profile process for a profile.

Remove Profile
The profile specified in the text field will be deleted.

Set Profile as Default
The profile specified in the text field will become the default profile. This profile is displayed in the menu preceded by a checkmark. The default profile is the profile used when the Sync Files With Default Profile action is run.

Unmark Default Profile
This is the only function which ignores the profile name in the text field. After executing this function there will be no default profile.

Validate Paths
A test will be made to determine if the source and destination paths are available. Note that this is done automatically whenever a profile is run. If everything is okay, you will be given the option to run the profile or to return back to the main panel.

Action Help
This document will be displayed in your browser.

A profile name
When a profile name is selected it is copied to the main panel's text field.

Sync Files With Default Profile

If a default profile has been designed via the Sync Files Utility action and the paths can be verified, the batch processor will be launched to run the profile.



Configuring Permute 3

The most important configuration to be made is to ensure that whatever presets you want to use have been added. You do this in Permute 3 - Preferences - Presets via the Add New Preset button. Click on Audio, then choose a preset from the preset control and click on Add. Changes are not applied until Permute 3 - Preferences is closed.

Note that Permute 3's AAC preset does not refer to AAC in m4a files! Here's a list of the presets you should be using:

It is also recommended that you make the following Permute 3 - Preferences - General settings:





Content List:

Action : Sync Files - Batch Processor

Action : Sync Files Utility

Action : Sync Files With Default Profile

Requirements:

Yate v6.5

History:

2020-05-19  v1.0 First release.

Download


Back to Yate Resources