Keep compilation tracks together when renaming¶
The problem¶
A compilation has a common album title but different artists on its tracks.
An outer %artist% folder can scatter those tracks across several folders.
Choose an album-level folder credit while retaining each track's own artist
in the filename. A compilation flag and an album-artist credit are separate
fields; one does not automatically supply the other.
Use copies, check the selection and resolve pending tag edits first. This
practice album is Harbour Sessions. Where it represents your intended
credit policy, give all its tracks ALBUMARTIST = Various Artists while
keeping their different ARTIST values. That text is a chosen credit, not a
special command or a guarantee about player grouping.
The solution¶
- Inspect and deliberately save the chosen
ALBUMARTIST,ARTIST,ALBUM,TRACKandTITLEvalues on the copied album. Do not change credits just to force a filename convention without deciding what those fields mean. - Select the intended copies. Hidden selected rows can remain in a batch, so use Edit → Unselect all first if the active filter obscures scope.
- Choose Convert → Tag → Filename… (Alt+1; Alt is ⌥ Option on macOS).
-
Enter:
-
Choose Preview. All rows below use
ALBUM=Harbour Sessions. Relative paths resolve under each source file's current containing folder;/shows folder levels. The rows without album artist demonstrate fallback splitting even whenCOMPILATIONis set.Scroll the table sideways on a narrow screen to read the complete destinations.
Artist Album artist Compilation Track Title Source name Relative destination Juniper ValeVarious Artists11Paper Boatsold.mp3Various Artists/Harbour Sessions/01 - Juniper Vale - Paper Boats.mp3Mira SolbergVarious Artists12Low Tideold.mp3Various Artists/Harbour Sessions/02 - Mira Solberg - Low Tide.mp3Juniper ValeAbsent 11Paper Boatsold.mp3Juniper Vale/Harbour Sessions/01 - Juniper Vale - Paper Boats.mp3Mira SolbergAbsent 12Low Tideold.mp3Mira Solberg/Harbour Sessions/02 - Mira Solberg - Low Tide.mp3Mira SolbergVarious ArtistsAbsent 2Low Tideold.flacVarious Artists/Harbour Sessions/02 - Mira Solberg - Low Tide.flac -
Verify the common album folder, individual filenames, source extension, destination root and existing destination contents. Correct any missing album/artist/title data or repeated names before applying.
- Choose Apply to … files for the checked practice plan. Inspect the results and errors. The converter changes paths immediately and leaves metadata credits as supplied; it does not need a second Save tags step.
How it works¶
$if2(%albumartist%,%artist%) chooses the first album-artist value when it
contributes text. If it does not, the first track artist becomes the outer
folder. It is a per-file fallback, so a compilation with missing album artists
can split exactly as the third and fourth rows show.
The rest of the format creates the album folder, a padded track number and
an explicit track credit/title. COMPILATION does not appear in this format,
so changing that flag does not change these calculated destinations. In its
constrained ID3/MP4 representations, enable the flag with 1 or remove it;
see sort fields and compilations before editing.
A field with several values contributes its first value to a plain placeholder. Do not expect the filename to list every artist unless you deliberately choose and test an explicit join. Slashes inside ordinary values use the configured folder-separator replacement; literal separators in the format create folders.
Variations¶
If you want one fixed outer folder independent of any album-artist spelling, use this complete alternative after checking that the whole selection belongs there:
The first practice row becomes
Compilations/Harbour Sessions/01 - Juniper Vale - Paper Boats.mp3.
This literal path policy does not write a compilation flag or album artist.
For a multi-disc compilation, retain disc identity too:
With the first practice row and DISCNUMBER = 2/2, expect
Various Artists/Harbour Sessions/CD02/01 - Juniper Vale - Paper Boats.mp3.
Check disc tags first: missing/nonnumeric values can produce CD00. The
multi-disc recipe explains optional disc folders.
Recovery and common mistakes¶
All tracks sharing this relative format only meet in one destination when their starting roots also suit that plan. Files from different source folders can create parallel layouts; choose a real absolute archive root deliberately when consolidation is intended. Reapplying a relative expression after a move can nest the same hierarchy again.
A numbered filename is not proof of correct album order. $num reads each
stored track; it does not run auto-numbering or infer totals. Identical
metadata can produce identical target names. Inspect the preview and actual
folder contents without assuming every filesystem alias or collision is
covered by one naming convention.
Sidecar art, playlists and old empty folders are separate from this audio-file move. Check Keep moved files when an entry leaves the list. Review any partial operation errors, inspect recorded Edit → Undo while available, and keep originals for recovery if paths later become occupied.