# [Tex/LaTex] Tutorial: TeXstudio add output path

texstudio

How can I add (in TeXstudio and Windows) an output directory for all those (un-)necessary files (I don't need 'em, LaTeX does: .aux, .glo, .idx, .log, …) and automatically create this directory if it doesn't exist?

The pdf file can/should remain in the same directory as the main .tex file.

1. Create a batch file containing the command mkdir _output, which will create a folder named _output when run. Change _output to whatever name you like in both in this step and below. Save the batch file in a known and easy to access location.
6. Add --aux-directory=_output to the end of PdfLaTeX command in Commands.