Application icon

Sync Files

This suite contains actions to convert files in place via Permute 3 and to synchronize the metadata in files between two copies of the files. In version 1.0 of these actions they were distributed separately. As a large number of the same helper actions are used it was decided to bundle the actions into a single distribution suite. If you installed version 1.0 of the Permute 3 Convert Selected Files action, it will not update by the action updater. You must install this Sync Files suite.

For those of you who used version 1.0 of the Sync Files actions, we have attempted to migrate your profiles to the newer format now used. It might be a good idea to display a profile before using it to ensure that everything looks okay.

For those of you who worked with Permute 3 and version 1.0 of these actions, please note the following. Version 1.0 only interacted with the out of the box presets supplied by Permute 3. The current actions can interact with any enabled audio preset.

If you are using the Permute 3 functionality of these actions please note that version 3.6.4 or later is required. Version 3.6.4 enabled the ability of Yate to specify the destination folder. You should read the Working With Permute 3 Presets topic to learn about matching presets based on audio properties.



Permute 3 Convert Selected Files

Permute 3 Convert Selected Files - Select Destination

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Content List, Requirements & History




Permute 3 Convert Selected Files

This action is used to convert all selected files to a different file format using Permute 3. Regardless as to how Permute 3 is configured, the produced files will end up in the same folder as the selected files. Note that all metadata is preserved.

By default, source files will not be modified. You can choose to move source files to the trash or delete them (careful!). You do this from the picker control's menu. There is also a hybrid method which will attempt to move the files to the trash and if not possible will delete them. You select the mode from the picker control's menu. Here is a sample of what the menu can look like:



New Profile Image

The items in the top area of the menu are enabled Permute 3 audio presets. Potentially under the natural presets you will see one or more Exact Match preset selections. These are discussed in Working With Permute 3 Presets. The next portion of the menu contains the source deletion options. Action Help displays this document. Active Permute 3 Audio Presets is discussed Displaying the Active Permute 3 Presets

Using the panel's displayed checkbox, you can elect to overwrite existing files.

Once you have your options configured, select a Permute 3 preset from the picker control's menu. The processing will start immediately.

Note that if a source file has a video track or if the Permute 3 preset is iPhone Ringtone, the source file will not be removed regardless of the source disposition option that you chose. This is a sanity check as the produced files will have less content.

m4a files can be ALAC or AAC. In the case of a naming collision, - AAC or - ALAC will be appended to the filename.

You can also use this action to test which Permute 3 preset would be chosen by an Eaxct Match preset. See Testing Permute 3 Preset Choices for additional information.



Permute 3 Convert Selected Files - Select Destination

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Back to top of page




Permute 3 Convert Selected Files - Select Destination

This is a simpler form of a conversion. You choose a single Permute 3 preset name and supply a destination folder. All selected files are converted and all metadata is preserved. A log file named log.txt is created in the destination folder.

Permute 3 Convert Selected Files

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Back to top of page




Sync Files Utility - Overview

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.

Two user facing actions are supplied:

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.4 or later.



Permute 3 Convert Selected Files

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Back to top of page




Sync Files Utility

This description describes the panels displayed for those of you that have Permute 3 on your Mac. If you do not, the panels will differ slightly. 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 selecting 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 popup menu displays the filename extensions supported by Yate. 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). If you intend to use Permute 3 to produce missing files, you must specify a filename extension on this panel.



Copy Files Image

You must decide if you want to attempt to create missing files by copying them or by using Permute 3 to produce the files.



Choose Permute 3 Preset

If you have Permute 3 on your Mac and you've elected to create missing files and you have specified a destination filename extension, you can specify which Permute 3 preset to use. The menu will display the name of all enabled Premute 3 audio presets. There may also be one or more Exact Match items. More information on Permute 3 presets can be found in the Working With Permute 3 Presets topic.

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.

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 Profile Information
A test will be made to determine if the source and destination paths are available. If a Permute 3 prefix is part of the profile a test will be made to ensure that the profile is 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.

Active Permute 3 Audio Presets
See Displaying the Active Permute 3 Presets

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.


Permute 3 Convert Selected Files

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Back to top of page




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.



Permute 3 Convert Selected Files

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Back to top of page




Configuring Permute 3

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


Permute 3 Convert Selected Files

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Back to top of page




Working With Permute 3 Presets

These actions can interact with any enabled Permute 3 audio preset. Presets are enabled, created, duplicated and edited in Permute 3 - Preferences - Presets. 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! More than likely these are the out of the box presets that you should be working with: AIFF, Apple Lossless, FLAC, M4A, MP3, Ogg (Audio) and WAV.

If you want to convert to a particular audio format as specified in one of the enabled presets, there's nothing else to consider. However if you want to preserve the quality of the source files there are additional steps you will have to take. Permute 3 supports the configuration of Channels (Yate's Channel Count property), Sample Rate and Sample Bits (Yate's Bit Depth property) for AIFF, Apple Lossless, FLAC and WAV based presets.

Based on your enabled presets, these actions will optionally present presets named AIFF Exact Match, ALAC Exact Match, FLAC Exact Match and WAV Exact Match. The Exact Match presets are artificial and express a desire to retain the characteristics of the source audio files. This means that FLAC Exact Match implies a conversion to FLAC retaining the source properties.

Exact Match only succeeds if a preset of the desired class exactly matches the audio properties of the source file. In a Permute 3 preset Channels can be set to As Source. This setting is always matched. Sample Rate can be set to Same as source which implies as close as possible. This setting is also always matched. Sample Bits has no default or Same as source setting. By defining multiple presets you can ensure that an Exact Match can be satisfied. This is easy to do by duplicating then editing a preset to have the required characteristics. These actions will detect all enabled audio presets.

When you select one of the Exact Match presets, on a per file basis Yate will attempt to find a preset which is an exact match for the file's properties. If an exact match cannot be found Yate will then scan for only those Permute 3 presets, associated with the same target audio format, containing a -- sequence. The preset names are formatted as follows:

name -- filename-extension {S #} {C #} {B #}

Note that there is a required space before and after the -- sequence. The S, C and B sequences can appear in any order. If any are included, a space must follow the filename-extension. Spaces after S, C and B before the # are optional.

The filename-extension can be any filename extension without the leading period. Example: aiff, flac, etc. The entire preset name is treated as being case insensitive. A special filename-extension of any can be specified.

The S sequence provides a sample rate. Example S 41000. The C sequence provides a number of channels. Example C2. The B sequence supplies a bit depth. Example B16.

Yate will examine every preset which applies to the class Exact Match which you chose. Note that the class of AIFF, ALAC, FLAC or WAV has nothing to do with the Permute 3 preset names. A Permute 3 preset is always associated with a particular class representing the output format.

When examining preset names a match is scored as follows:

The following examples all assume that the named preset has a FLAC target:

FLAC 1 -- aiff  S96000
Only matches source files with an extension of .aiff and a sample rate of 96000 Hz

FLAC 2 -- wav
Only matches source files with an extension of .wav

FLAC 3 -- any
Matches all files

FLAC 4 -- wav c1 S8000
Only matches source files with an extension of .wav which are mono and have a sample rate of 8000 Hz.

Permute 3 Convert Selected Files

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Back to top of page



Displaying the Active Permute 3 Presets

An Active Permute 3 Audio Presets menu item will display a list of the available Permute 3 audio presets and a summary of their settings. The summary is enclosed in parenthesis. The first contained item (and possible only item) is the internal class name for the type of audio file being produced. If a C item is displayed, the value is Channels setting (0 for As Source). If an S item is displayed, the value is the Sample rate setting (0 for same as source). If a B item is displayed, the value is the Sample Bits setting.


Sample:



Main Menu Image

Permute 3 Convert Selected Files

Permute 3 Convert Selected Files - Select Destination

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Back to top of page




Testing Permute 3 Preset Choices

You can test how your Permute -3 presets are chosen relative to loaded selected files in the Permute 3 Convert Selected Files action. Hold down the Option key while selecting one of the Exact Match presets from the menu. The log viewer will describe which preset was match, if any, for every selected file.



Permute 3 Convert Selected Files

Sync Files Utility - Overview

Sync Files Utility

Sync Files With Default Profile

Configuring Permute 3

Working With Permute 3 Presets

Displaying the Active Permute 3 Presets

Testing Permute 3 Preset Choices

Back to top of page




Content List, Requirements & History


Content List:

Action : Sync Files - Batch Processor

Action : Sync Files Utility

Action : Sync Files With Default Profile

Action : Helper: Build Permute 3 Preset Menu

Action : Helper: Convert v1 Profile

Action : Helper: Display Active Presets

Action : Helper: Extension for Permute 3 Preset

Action : Helper: Extract Permute 3 Presets

Action : Helper: Extract Profile Metadata

Action : Helper: Is Permute 3 Preset Active

Action : Helper: Match Permute 3 Preset

Action : Helper: Run Batch Processor

Action : Helper: Validate Profile

Action : Helper: Verify Profile Exists

Action : Permute 3 Convert Selected Files

Action : Permute 3 Convert Selected Files - Select Destination

Rename Template: Variable 0

Requirements:

Yate v6.6

History:

2021-05-18  v1.0 First release.

2021-06-24  v2.0 Combined PerMute 3 and Sync Files in this bundle. New Preset handling. Released to the Preview List.

2021-07-04  v2.1 Support for Permute 3 installed by SetApp. Released to the Preview List.

2021-07-12  v2.2 Changes for Yate v6.6. Released to the Preview List.

2021-07-17  v2.3 Various cosmetic changes.

2021-07-18  v2.4 Files passed to Permute 3 which contained special characters were not escaped properly.

2021-07-20  v2.5 Accumulated changes for Yate v6.6.

2021-07-24  v2.6 Minor adjustments.

2021-07-26  v2.7 Patched Helper: Is Permute 3 Preset Active.

Download


Back to Yate Resources