[Tex/LaTex] pdflatex custom command for texstudio only run in cmd

miktextexstudio

I've just installed MikTex by which TexStudio came aswell as the editor. So far the editor seems fine. My only problem arises once I have to compile and actually look at what I've created.

For now every time I compile something it goes into my C:\users\myname folder. But my tex file is saved under C:\Development\latexWorkspace under the name helloWorld.tex.

I've read through some forums and found out i could do

pdflatex -aux-directory=C:\Development\latexWorkspace -output-directory=C:\Development\latexWorkspace C:\Development\latexWorkspace\helloWorld.tex

So I thought, hey I just change the build in execution of pdflatex in TexStudio.
So i changed that command under Options > Configure TexStudio > Commands > PdfLatex to

pdflatex -aux-directory=C:\Development\LatexWorkspace -output-directory=C:\Development\LatexWorkspace %.tex

However i was just given the message:

Error: Could not start the command: pdflatex -aux-directory=C:\Development\LatexWorkspace -output-directory=C:\Development\LatexWorkspace "HelloWorld".tex

I even copied that Error right into CMD and it ran just fine as expected.

Can it be that TexStudio use a custom shell to run commands or such?
How can i make it output everything to that folder of mine I want it to?

Best Answer

[OPs comment converted to an answer]

Just had to change C:\Development\LatexWorkspace to C:\\Development\\LatexWorkspace.

Related Question