File Naming Patterns

Configure automatic file organization using metadata placeholders. Patterns are applied when uploading, moving files, or after metadata updates.

Metadata Quality Notice: File naming relies entirely on metadata stored in Booklore. This feature is recommended only for high-quality, curated libraries with complete metadata.

Default Pattern

Fallback pattern when no library-specific override is configured.

@if (defaultErrorMessage) { {{ defaultErrorMessage }} }
Preview: {{ generateDefaultPreview() }}

Library Overrides

Define custom patterns for specific libraries. Leave empty to use the default pattern.

@if (libraries.length === 0) {

No libraries found

Create a library to configure custom naming patterns

} @else {
@for (library of libraries; track library.id) {
{{ library.name }} @if (library.fileNamingPattern) { Custom } @else { Using Default }
Preview: {{ generateLibraryPreview(library) }}
}
}

Placeholders Reference

Use placeholders to dynamically insert metadata into file names and folder paths.

Available Placeholders

{{ '{title}' }}Book title
{{ '{subtitle}' }}Book subtitle
{{ '{authors}' }}Author(s)
{{ '{year}' }}Publication year
{{ '{series}' }}Series name
{{ '{seriesIndex}' }}Series index
{{ '{language}' }}Language code
{{ '{publisher}' }}Publisher
{{ '{isbn}' }}ISBN number
{{ '{currentFilename}' }}Original filename

Optional Blocks

Wrap parts in angle brackets {{ '{<...>}' }} to make them conditional. If any placeholder in the block has no value, the entire block is omitted.

Pattern: {{ '{<{seriesIndex} - >{title}' }}
With index: 01 - Dune
Without: Dune

Pattern Examples

Sample patterns with example metadata to help you understand how patterns work.

With Full Metadata

Basic pattern {{ '{authors} - {title}' }} Patrick Rothfuss - The Name of the Wind.epub
With punctuation {{ '{title}: {series}' }} The Name of the Wind: The Kingkiller Chronicle.epub
Series in folder {{ '{authors}/{series}/{seriesIndex} - {title}' }} Patrick Rothfuss/The Kingkiller Chronicle/01 - The Name of the Wind.epub
Folder only {{ '{title}/' }} The Name of the Wind/name_of_the_wind_original.epub
Absolute path {{ '/{authors}/{title}' }} /Patrick Rothfuss/The Name of the Wind.epub
Title + Subtitle {{ '{title}: {subtitle}' }} The Name of the Wind: Special Edition.epub

With Missing Optional Fields

Optional blocks {{ '{authors}/<{series}/><{seriesIndex}. >{title}< ({year})>' }} Andy Weir/Project Hail Mary (2021).epub
SeriesIndex fallback {{ '<{seriesIndex}. >{title}< - {authors}>' }} Project Hail Mary - Andy Weir.epub
Brackets fallback {{ '<[{series}] >{title} - {authors}' }} Project Hail Mary - Andy Weir.epub
Series punctuation {{ '<{series}: >{title} by {authors}' }} Project Hail Mary by Andy Weir.epub
Year prefix {{ '{authors}/{year}__{currentFilename}' }} Andy Weir/2021__project_hail_mary_final.epub
Subtitle fallback {{ '{title}<: {subtitle}>' }} Project Hail Mary.epub