I read here (second comment to the question)
When should I use \input vs. \include?
that \@input
"does not throw an error if the file does not exist".
If I try
\documentclass{article}
\begin{document}
\@input{toBeIncluded.tex}
\end{document}
I indeed get no fatal error, but still i get 3 compilation errors and, more importanly, my pdf contains the word "inputtoBeIncluded.tex".
Is there a simple way to completely ignore the input command if the input file does not exist?
Thanks a lot
@
in the command name you need to write\makeatletter\@input{...}\makeatother
.\InputIfFileExists{file}{then}{else}
, you can just leave then, else blank. For details seetexdco source2e