Skip to content

Instantly share code, notes, and snippets.

@robpataki
Last active April 15, 2026 08:45
Show Gist options
  • Select an option

  • Save robpataki/511ddb6df55ebe089ba2 to your computer and use it in GitHub Desktop.

Select an option

Save robpataki/511ddb6df55ebe089ba2 to your computer and use it in GitHub Desktop.
File naming convention for XLD encoding

Compilation

%A - %T  -  %n - %a - %t

Example:

Various Artists - Tony Hawk's Pro Skater 2 (The Album) - 13 - Fu Manchu - Evil Eye.m4a

Album

%A - %T  -  %n - %t

Example:

Nine Inch Nails - Purest Feeling - 04 - The Only Time.m4a

Multi-disc compilation

%A - %T  -  %[%D%]%n - %a - %t

Example:

Kruder & Dorfmeister - The K&D Sessions™ - 203 - Mama Oliver - Eastwest (Stoned Together).m4a

Multi-disc album

%A - %T  -  %[%D%]%n - %t

Example:

Graeme Revell - The Crow Motion Picture Score (Deluxe Edition) - 202 - Truth To The Dead.m4a

Ids

Source: https://github.com/gmw/xld/blob/master/XLD/English.lproj/MetadataEditor.xib

%n: Track number
%N: Total tracks
%D: Disc number
%t: Title
%T: Album title
%a: Artist
%A: Album artist
%g: Genre
%G: Grouping
%c: Composer
%C: Comment
%I: DiscID
%y: Year
%f: Format
%i: ISRC
%m: MSCN
%o: Original file name

Screenshots

XLD
@robpataki
Copy link
Copy Markdown
Author

Hey @benthomas-carsales thanks for the comment, I appreciate it. I've double checked the %d and even though in the source code it is present I can't get it working either. I updated the gist to reflect the issue and I raised an issue on Github.

@benthomas-carsales
Copy link
Copy Markdown

👍

@elmimmo
Copy link
Copy Markdown

elmimmo commented May 30, 2025

Metadata identifier surrounded by %[ and %] is ignored when it is empty. One can for instance use %[%D-%]%n to prefix track number with disk number only when the latter exists.

@benthomas-carsales
Copy link
Copy Markdown

@elmimmo That's cool! Thanks for sharing.

@robpataki
Copy link
Copy Markdown
Author

@elmimmo thank you for that info that's really good to know. I once again updated the gist with this and dropped the %d from the options. I recently found out that the XLD app is showing a list of available file naming options in a tooltip I haven't seen before (screenshot also added to the gist). Thanks again everyone, So good to see others are finding this useful :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment