# Glossaries - how to deal with auxiliary files in another directory using MikTeX?

To keep my main folder clean, have redirected the auxiliary files using the -aux-directory=.\auxiliaries command in LaTeX and PdfLaTeX (1). However, when making the glossaries, TeXstudio gives the following message:

Auxiliary file 'main.aux' doesn't exist. Have you run LaTeX?

Pasting the same command into the Makeglossaries field yields the same result.

How can i make glossaries find the aux files?

Minimal working example that works when the aux files are in the main directory, but not when the aux files are redirected into a subfolder:

\documentclass[12pt, twoside, a4paper, english]{report}
\usepackage[toc,symbols,nomain]{glossaries}
\newglossaryentry{pi}{type=symbols,name={\ensuremath{\pi}},sort=pi, description={ratio of circumference of a circle to its diameter}}
\makeglossaries

\begin{document}
\printsymbols[title=List of Symbols]
\section{Text}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\gls{pi}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\end{document}

• Coud you post a minimal (non-) working example? – Bernard Apr 13 '16 at 14:20
• @Bernard i updated my question with a working example. – DJHellduck Apr 13 '16 at 14:44
• my guess is, you have to expand the searchpath. – naphaneal Apr 13 '16 at 14:47

Running on the command line makeglossaries --help one can see the options it knows. Beside other the -d switch:
So add -d auxiliaries to the call.