# LaTeX can't find main.tex file in certain directories

After doing an update of MiKTeX all my latex documents don't work anymore! I also get strange results with this minimal example:

\documentclass{article}
\begin{document}
test
\end{document}


running this from a existing path of a not working LaTeX project I get this error:

This is XeTeX, Version 3.14159265-2.6-0.99996 (MiKTeX 2.9.6210 64-bit)
entering extended mode
! I can't find file Minimal.tex'.
<*> Minimal.tex


If I run it from a new path it works fine.
If I then copy the files of an existing LaTeX project into this new path, I get the error again. If I copy any not working LaTeX project from the server to my local disk it works!

Any help would be greatly appreciated!

PS: the server is a local network (at work). Here is an example:

Command Line:   xelatex.exe --interaction=errorstopmode --include-directory="\\SERVER\Laufend\LAUFENDE PROJEKTE\2015\15-025 B-Plan Strausberg Garzauer Straße 55\Bericht_Nachtrag_II" --synctex=-1 "Minimal.tex"
Startup Folder: \\SERVER\Laufend\LAUFENDE PROJEKTE\2015\15-025 B-Plan Strausberg Garzauer Straße 55\Bericht_Nachtrag_II\TeXAux


If I copy the project to a local directory everything works fine.

Command Line:   xelatex.exe --interaction=errorstopmode --include-directory="C:\Users\micha.KSZ\Documents\LATEX\Bericht_Nachtrag_II" --synctex=-1 "Minimal.tex"
Startup Folder: C:\Users\micha.KSZ\Documents\LATEX\Bericht_Nachtrag_II\TeXAux


But it's not the server path in general that does not work! The minimal example runs for instance fine from here:

Command Line:   xelatex.exe --interaction=errorstopmode --synctex=-1 "Minimal.tex"
Startup Folder: \\SERVER\Laufend\LAUFENDE PROJEKTE\2015\15-025 B-Plan Strausberg Garzauer Straße 55\Test


PPS: now it gets interesting. If I create a network drive it works also.

Command Line:   xelatex.exe --interaction=errorstopmode --include-directory="L:\LAUFENDE PROJEKTE\2015\15-025 B-Plan Strausberg Garzauer Straße 55\Bericht_Nachtrag_II" --synctex=-1 "Bericht_B-Plan_Garzauer_Str.tex"
Startup Folder: L:\LAUFENDE PROJEKTE\2015\15-025 B-Plan Strausberg Garzauer Straße 55\Bericht_Nachtrag_II\TeXAux

• Welcome to TeX.SX! Did you try to delete the .aux file (etc.)? Feb 22, 2017 at 14:11
• Yes I deleted the .aux file (etc.). But it still doesn't work. Feb 22, 2017 at 14:19
• Please provide the correct path to the XeLatex and PdfLatex compiler. You can check the same in the configure option of the texstudio.
– M S
Feb 22, 2017 at 14:30
• [C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdftex.exe] and [C:\Program Files\MiKTeX 2.9\miktex\bin\x64\xelatex.exe] I'm using WinEdt 9 Feb 22, 2017 at 15:01
• What do you mean by "from the server"? Is the file on some remote device? Feb 22, 2017 at 16:34

I don't think this has something to do with your MiKTeX update...

The fact is that you are using redirection of auxiliary files to the directory TeXAux in WinEdt, and this doesn't work with UNC paths (like \\SERVER).

That's the reason why all your examples don't fail but the first one.

Excerpt from the latest WinEdt documentation:

Known limitations: The implementation of this feature does not work with UNC directories because TeX currently does not allow such specifications in its TEXINPUTS or BIBINPUTS search path directives (perhaps for good reasons).

If you want it to work simply delete the directory TeXAux in the path

\\SERVER\Laufend\LAUFENDE PROJEKTE\2015\15-025 B-Plan Strausberg Garzauer Straße 55\Bericht_Nachtrag_II
`

or create a network drive (as you did already) from which you can launch XeLaTeX.

• You are right. Deleting the directory TeXAux works. But I still don't understand why some projects with the directory TeXAux + UNC directory work and others don't. Feb 23, 2017 at 13:16