Auto-Extracting Text
Access: Main Editor multi-tag popup menu
Single-Column Name-To-Tag Extractions -

Name-to-tag extractions are performed using the upper section of the Editor's Multi-tag Popup menu, shown above. The process operates only on selected rows, and upon the specific column right-clicked to produce the popup. In the example above, rows 1, 2, and 4 have been selected and are highlighted, so these are the only rows that will be operated upon. The Artist column has been right-clicked, which causes its column header to become highlighted. The Artist field in files 1, 2, and 4 will receive data from an extraction.
Extractions in Tag Clinic are based on the idea that any file name can be perceived as if it were composed of a series of "text blocks" isolated from each other by some type of "separator." For example, consider the following file name:
Big Daddy - Eye of the Tiger.mp3
A simple way to view this filename is to envision it composed of two blocks of text, "Big Daddy " and " Eye of the Tiger," with each block isolated from the other by a hyphen. The hyphen, then, is the "Separator." In Tag Clinic, a Separator can be chosen to be a hyphen, a comma, a period, a space, and others. Thus, the filename above could also be viewed as being composed of seven blocks of text, with each block isolated from its neighbors by a "space" character.
To create tag data from filenames or path names, you first choose an appropriate Separator, select the rows you want to extract data into, right-click on the column you want to extract into, and choose from the popup which occurrence of a Separator you want extraction to begin. You can also choose where you want it to end - see Extract to below. The choice of Separator to use can be specified at several locations throughout the program: via the popup menu's "Separator" section itself (see below), the Main Menu's "Separator" section, a popup menu on the Status Bar, the Rename Page, or by choosing one on the Separator Toolbar.
- Extract 1st: Extracts text starting from the beginning of a name and ending at the first occurrence of a Separator.
- Extract 2nd: Extracts text from between the first Separator found in a name and the second.
- Extract 3rd: Extracts text from between the second and third Separators.
- More: Use the top section of this submenu to extract text from between subsequent Separators up to the twelfth (or to extract all text after the last Separator):

The bottom section begins with a an "Extract Track" selection, useful for extracting track numbers from file names when track numbers are not located conveniently between Separators. This option will look for and extract the first one- or two-digit number found in file names. Numbers found must be either 1) at the beginning of a name, and have a space or hyphen following, or 2) at the end of a name and have a space or hyphen before, or 3) inside a name and have a space or hyphen both before and after. The last three selections are used to extract text from between, respectively, the first set of parenthesis, square brackets, or curly brackets found in a filename.
Separator: Selects the Separator to search for in names to determine where one piece of extraction text begins, where it ends, and where the next one begins. By default, the Separator chosen here is synchronized with the one shown and selectable on the Rename Page, the Main Menu, and elsewhere. If you change the Separator in one location it is automatically changed in all the others. You can, however, choose to allow assignment of an individual Separator for each Editor page, and another for the Rename page (see the Behavior section in Preferences). The active Separator is always shown in the Status Bar, and you can click on it there to select another via popup menu.
- [ - ] A dash with a space on each side
- [-] A dash with no spaces on either side
- [- ] A dash with a space on the right side
- [ -] A dash with a space on the left side
- [ _ ] An underbar character
- [ . ] A period
- [ , ] A comma
- [ , ] A comma with a space on the right side
- [ ~ ] A tilde with a space on each side
- [~] A tilde with no spaces on either side
- [ ] A space
Several other Separator-related tools and options are provided in this section:
- Extract from...: Selects the data source for the extraction of data into tags.
- File Name: Tag data are created by extracting it from each file's file name (the current folder path shown on the Center Toolbar is colored black when this option is active).
- Folder Name: Tag data are created by extracting it from file paths (the current folder path shown on the Center Toolbar is colored red when this option is active). The backslash character is always used as the Separator for this type of extraction.
- Extract to...: Determines how the end-of-data point is determined in the extraction process. By default, end-of-data is located one character before the beginning of the next Separator (or the end of the name itself, if that comes first), but three additional choices are available.
- 1st separator: This is the default setting. End-of-data occurs at the first occurrence of the active Separator.
For example, assume " - " is chosen as Separator when extracting text from filename
Bach, J.S. - Sonata BWV 526 - 03 Allegro - Organ Works.mp3,
Right-clicking the "Title" column and choosing "Extract 1st" from the Popup menu (described above) extracts
Bach, J.S.
into the file's "Title" tag field. In other words, all text from the beginning of the name up to the occurrance of the first Separator is extracted into the Title column.
2nd separator: Extract text located between any Separator and the second one found after it. (A small LED () on the Center Toolbar is turned on when this selection is active.)
As an example, for the filename
Bach, J.S. - Sonata BWV 526 - 03 Allegro - Organ Works.mp3,
right-clicking the "Title" column and choosing "Second" on the popup menu extracts
Sonata BWV 526 - 03 Allegro
into the file's "Title" tag field. Note here that the first Separator in the name defines where the second block of text begins, while the second defines where it ends.
3rd separator: Extract text located between any Separator and the third one found after it. (A small LED () on the Center Toolbar is turned on when this selection is active.)
As an example, we assume this time that a "space" is the active Separator. For the filename
Casey Crime Photographer 47 05 08 The Laughing Killer.mp3,
right-clicking the "Comment" column and choosing "Fourth" on the Popup extracts
47 05 08
into the file's "Comment" tag field. Note that if Number Grouping (described below) were enabled, "470508" would be extracted.
end of file name: Text located between any Separator and the end of text is extracted. (A small LED () on the Center Toolbar is turned on when this selection is active.)
Again as an example, and again with " - " as Separator, for the filename
Bach, J.S. - Sonata BWV 526 - 03 Allegro - Organ Works.mp3,
right-clicking the "Title" column and choosing "Second" on the Popup extracts
Sonata BWV 526 - 03 Allegro - Organ Works
into the file's "Title" field.
Number Tools: The following three Separator tools can be used in special cases to alter or condition filenames before extracting text (they may also be applied when editing cell text). Since these tools actually alter the file names themselves, they are typically used in cases where files will be renamed again anyway, using extracted data.
File names sometimes contain one or more numbers "sandwiched" in between other text (numerical dates, for example), which may also contain spaces or symbol characters separating them from one another or from adjacent text. This can make it more difficult to extract neighboring text, or the numbers themselves. By applying one or more of these functions beforehand, extraction of the desired text can be simplified.
For each function, the filename below is used as an example of usage (with a hyphen used as the Separator):
Casey Crime Photographer 1-05-2006 The Laughing Killer.mpc
'numbers' --> '-numbers': Adds a Separator to the front of all non-leading numbers or groups of numbers (a leading number is a number that appears at the very start of data). Result:
Casey Crime Photographer-1-05-2006 The Laughing Killer.mpc
'numbers' --> 'numbers-': Adds a Separator to the end of all non-trailing numbers or groups of numbers (a trailing number is a number that appears at the very end of text). Result:
Casey Crime Photographer 1-05-2006-The Laughing Killer.mpc
'num-ber-s' --> '-numbers-': Removes all non-alphabetic characters ("symbol" characters) from text that is found to be made up of only numbers and symbols. Result:
Casey Crime Photographer 1052006 The Laughing Killer.mpc
Number Grouping: When enabled, names used for name-to-tag extractions have all three Number Tools described above applied during an extraction process. Unlike when using the three tools above individually, the filenames from which the text is obtained are not altered by the process. As an example, when this option is enabled, the filename
Casey Crime Photographer 47-05-08 The Laughing Killer.mp3
is treated as if it instead reads
Casey Crime Photographer-470508-The Laughing Killer.mp3,
for the purpose of extracting text. The file name is not actually altered, however. This allows "Casey Crime Photographer" and "The Laughing Killer" to be treated as if they were isolated from all the numerical data by Separators. Then, by using "Extract 1st" on the popup menu, the text "Casey Crime Photographer" can be extracted into, say, the Album field, while "Extract 3rd" can extract "The Laughing Killer" into some other field (here assuming a hyphen with no surrounding spaces is the active Separator).
The Number Grouping LED () on the Center Toolbar is turned on when this option is active.
Multi-Column Name-To-Tag Extractions -
Multi-Extract: Extracts file name text into multiple tag fields at one time. When this selection is chosen, the user is presented with the list of naming templates that have been created and are listed on the Rename Page (excluding any templates that involve path changes). Choose a template listed to extract Separator-delimited text from filenames into the tag fields contained in the chosen template. For example, consider the following file name:
Big Daddy - Eye of the Tiger.mp3
Highlighting the file's row and choosing Auto Extract > "Artist - Title" from the template list extracts "Big Daddy" into the "Artist" column and 'Eye of the Tiger' into the "Title" column.
If there are more tag fields contained in the template than there are Separator-delimited pieces of text in the name, extraction simply terminates. Thus in the example above, if the file were instead named "Big Daddy - Eye of the Tiger - 1980.mp3," the Artist and Title would still be extracted, but the remaining text, "1980," would be skipped.
Note that brackets and spaces in a template are ignored by this process; so, for example, templates "Album [Track] - Artist - Title," "Album-Track-Artist-Title," and "Album - Track - Artist - Title" will all produce the same results. Like most multi-file functions in Tag Clinic, this function operates on all files if no rows are selected, or just selected rows if one or more rows are highlighted.
Refer to heading Multi-Tag Popup Menu in topic Main Editor for information about how to use the other functions shown on this popup menu.
|