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.
Follow these few steps:
mkdir _output, which will create a folder named
_outputwhen run. Change
_outputto whatever name you like in both in this step and below. Save the batch file in a known and easy to access location.
--aux-directory=_outputto the end of PdfLaTeX command in Commands.
You're done! Enjoy a tidy tex-directory where all the "junk" is in the output directory. Only the .gz file remains in the tex-directory.
I hope someone finds this useful...