3.5 Filename extensions

You can use any filename extension for the input file, but if you do not use the recommended extension for a particular format you may need to manually specify the output format; for details, see Invoking lilypond-book. Otherwise, lilypond-book automatically selects the output format based on the input filename’s extension.

extensionoutput format

If you use the same filename extension for the input file than the extension lilypond-book uses for the output file, and if the input file is in the same directory as lilypond-book working directory, you must use ‘--output’ option to make lilypond-book running, otherwise it will exit with an error message like “Output would overwrite input file”.

LilyPond — Usage v2.23.82 (development-branch).