How to get name of text file to show

Just did an initial compile in Scrivener of the 2nd volume in the series I am writing. The TOC came through fine and have some minor formatting issues to resolve which is better than I had expected.

I am using a series of text files and folders in Scrivener to write the book. Is there a way, other than copying the name of the text file into the top of the file, to have it automatically be placed there as a part of the compile process ? :question:


Fellow Scrivener-user here. If you are looking to get the binder title of your Scriv documents included in your compile output, then I know the answer to this one:

Go to Compile. Make sure the All Options tab is selected. Click on Formatting in the Compilation Options column. There you can specify how much of the stuff associated with your documents you want to include: including title, text, notes, synopsis and even meta-data. There are different settings available for folders, container documents and regular documents. You probably want to adjust the settings of the third of these by checking Title and Text.