# Preferences - Replacements

Replacements may optionally be used when renaming files or while performing Case or Sort form functions in the Multi Field Editor or via actions.

Every replacement item consists of a from pattern and a to, possibly empty, pattern.

Certain characters are hard coded for replacement when renaming files. Currently only : and /. These hard coded from patterns are always replaced with the possibly empty pattern specified in the Preferences - Rename Invalid character substitution field. If for any reason you want a different to pattern for each of the hard coded values, create standard replacement items for them.

To create a new replacement item, click the + button under the rightmost table.

To remove new replacement items, select one or more items in the table and click the - button under the rightmost table.

To modify a replacement item's From field, select a single item in the table and click the ✎ button under the rightmost table. Optionally you can click directly on the field.

To modify a replacement item's To field, select a single item in the table and click the ✏︎ button under the rightmost table. This will give you a popup window in which you can edit the value. Optionally you can click directly on the field and do an inline edit.

In order to make it easier to manipulate a wide variety of files, replacements may be saved in sets. The table on the left of the display displays the defined sets.

To create a new set click on the + button under the leftmost table.

To delete a set, select the sets you want to delete and click on the - button under the leftmost table.

To duplicate a set, select the set you want to duplicate, and click on the ➡ button under the leftmost table.

To rename a set, select the set and click on the ✎ button under the leftmost table.

Certain replacement sets are used by various functions. These sets are not associated with particular names but are given the special status by means of the context menu. The following status indicators are used:

✓
  This is the default replacement set used by both Case and Rename functionality.
C
  If you want to differentiate which replacement sets are used by the Case and Rename functionality you can specify two different sets. This set is only used by the Case functionality.
R
  If you want to differentiate which replacement sets are used by the Case and Rename functionality you can specify two different sets. This set is only used by the Rename functionality.
F
  The Re-encode action statement's Fold Characters mode replaces various Unicode characters with their ISO-8859-1 equivalents. This set can be used to override the default substitutions. You set this special status from the context menu. If you wish to create a set filled with the default fold substitutions you can do so via the Create a Set With the Default Fold Character Values context menu item. Note that the created set will not automatically be supplied the special Fold Character status. More information on the formatting and usage of this set can be found in Fold Characters Substitutions.
P
  This set is used by the Sort Form last name - first name functionality. It describes sequences that are inherently part of a last name. For example Di, Le, Van der, etc. The from field is always case insensitive and may contain spaces. The to field is ignored. Note that the from sequences are detected by the presense of a space before a last name. Some of the default entries may seem redundant but may be required. For example O'Grady will always be treated as a single name. However O' Grady will only be treated as a single name if O' is in the set.
S
  This set is used by the Sort Form last name - first name functionality. It describes sequences which follow but are not to be treated as part of a last name. For example, Band, Ensemble, etc. The from field is always case insensitive and may contain spaces. The to field is ignored unless it is equal to +. This is a flag to imply that the sequence can be followed by any other sequence in the set. For example a from field of Jr. with a to field of +, implies that Jr. is to be ignored and may be optionally be followed by another item in the set such as Band.

# The following information applies to all sets other than the P, S and F status sets.

Replacements are case sensitive. If you want the from field to be considered case insensitive, prefix the field with: \~

The from string associated with a replacement is typically a simple text string. However you can specify that a replacement is only to be made if the from string is at the beginning of the source string, follows a newline character or follows a list of supplied characters. Note that when searching backwards for one of the previous conditions, space characters are ignored. The special characters are specified by starting the from string with the sequence \{characters\}. For example a replacement of:

> from: \{.-([<{:&'"?!/\}the (ends with a space)
> to: The (ends with a space)

will change the word the to The as long as it is at the beginning of a string, after a newline character or after one of .-( [ < { : & ' " ? ! /

If you want to use \~ and \{ sequences, the \~ sequence must come first and be immediately followed by the \{ sequence.

Another special sequence can be used to remove trailing periods (.). A from pattern of \. will remove all trailing periods (.) and replace it with the possibly empty to pattern.

Rename Templates

Rename Exceptions

Alphabetic Case Transformations