[Tex/LaTex] How to direct TeXShop to all all .aux files, also in subfolders, such that they can be trashed

auxiliary-filestexshop

I am writing a report in TeXShop with a main file (main.tex) and several chapter files, which I include with the \include command.
The main.tex looks as follows:

% !TEX TS-program = pdflatexmk
\documentclass{article}
\begin{document}
\include{chapters/one}
\include{chapters/two}
\end{document}

The directory structure looks like this:

root
|
|-main.tex
|
|-chapters
    |
    |-one.tex
    |-two.tex

When compiling, .aux files are created in the root folder but also in the chapters folder.
When something goes wrong and I want to trash the .aux files I press the "Trash Aux Files" button in the console or hit "Trash Aux & Typeset" in the menu.

However, this only trashes the .aux files in the root folder, not in the chapters folder.
Is there a way to direct TeXShop to the aux files in the subfolders?
I am using TeXShop 3.26 with pdflatexmk 4.37

Best Answer

After an e-mail to the developer of TexShop it turned out that I didn't read the manual. Going to Help -> TeXShop Help Panel... -> How do I configure TeXShop -> Hidden Preference Items I found:

Sometimes a more extensive cleanup is desirable. If the option key is held down while choosing "Trash AUX Files," TeXShop uses the "% !TEX root = ..." and "Set Project Root" mechanisms to find the root file. It then moves all files in the folder of this file and any subfolders of this folder to the trash if they have appropriate extensions, regardless of the names of the files. This behavior can be made the default behavior for "Trash AUX Files" without using the option key; issue the command

defaults write TeXShop AggressiveTrashAUX YES

This solved my problem.