Keep multi-disc albums distinct when renaming¶
The problem¶
Disc 1 and disc 2 both start with track 1. They may even both contain a title
such as Intro. A filename made from track and title alone can therefore
produce the same target twice. Keep the disc number in the folder or filename
instead of changing the original track numbering to hide that information.
Start with copied files in one practice folder. Save or deliberately discard
pending edits. Inspect ALBUM, DISCNUMBER, TRACK and TITLE in Extended
tags; the converter reads tags, not a guessed disc number from the filename.
The solution¶
- Select the copied album. Confirm the intended selection, including any rows hidden by a filter.
- Choose Convert → Tag → Filename… (Alt+1; Alt is ⌥ Option on macOS).
-
Enter:
-
Choose Preview. In the following table, all inputs use
ALBUM=Harbour Lights. Destinations are relative to each source file's current containing folder, with/showing folder levels. The absent-disc row demonstrates a result to correct before applying, not an inferred disc.Scroll the table sideways on a narrow screen to read the complete destinations.
Disc number Track Title Source name Relative destination 1/21/8Introold.mp3Harbour Lights/CD01/01 - Intro.mp32/21/9Introold.mp3Harbour Lights/CD02/01 - Intro.mp31210Last Harbourold.flacHarbour Lights/CD12/10 - Last Harbour.flacAbsent 1Introold.mp3Harbour Lights/CD00/01 - Intro.mp3 -
Confirm actual disc metadata, folder roots and every complete destination. If a disc value is missing or wrong, leave the preview and correct/save that metadata deliberately. Then run Preview again.
- Apply only the checked small plan with Apply to … files. Inspect both disc folders and operation errors. Paths change immediately; Save tags is not an additional rename confirmation.
How it works¶
%album% supplies the album folder. The literal CD and the padded leading
disc number create CD01, CD02, and so on. The next backslash starts the
filename within that disc folder. Track padding starts again from the actual
track tag of each file; the converter does not renumber the album.
A stored slash value such as 2/2 is one text value: $num reads its leading
2 and does not include the total. An absent/nonnumeric disc also yields
numeric zero, producing CD00. Width 2 is a minimum, not a two-digit limit.
No total is inferred from how many files are currently selected.
The two Intro examples now have distinct written destinations because their
disc folders differ. This illustrates the naming rule; it is not a universal
collision or overwrite guarantee. Review existing files, actual filesystem
behavior and any error reports before trusting a larger reorganization.
Variations¶
If disc folders should be omitted for files whose disc field is absent, choose this explicit conditional after reviewing that policy:
For TRACK = 1, TITLE = Intro and no disc field, the relative result is
Harbour Lights/01 - Intro.mp3. With disc 2/2, it is
Harbour Lights/CD02/01 - Intro.mp3. The backslash belongs inside the selected
branch; the empty branch contributes no extra disc folder. A present text
value 0 still takes the present branch and creates CD00; this is a presence
condition, not a test that the number is valid.
To keep one album folder while preserving disc identity in each filename:
For the second practice row, expect Harbour Lights/02-01 - Intro.mp3.
This changes the path convention, not the saved DISCNUMBER or TRACK.
If you prefer artist folders too, build that outer level after following the
artist/album recipe.
Recovery and common mistakes¶
A relative path is anchored at each input's containing folder. Files already in separate disc folders do not automatically converge on one album root; a relative expression can create another nested album beneath each disc. Use an intentionally chosen absolute root when consolidation is the goal.
Do not include the source extension unnecessarily: the host retains it. Moving only audio files does not promise to move folder images, cue sheets, playlists or other sidecars. Depending on Keep moved files, a moved track can leave the list while still existing at the shown destination.
Changing the expression or selection requires a new preview. Applying can report partial outcomes; inspect which files moved. Use Edit → Undo for recorded renames in the same desktop session, verify the original paths, and keep copies for recovery if a later file occupies an old name.