Possible Duplicate:
Expandable version of \InputIfFileExists or \IfFileExists
I am writing a LaTeX file where I input other LaTeX files (if and only if its exits, otherwise it should not include that file).
***** TFout_1.tex exist*********** ***** TFout_2.tex doesn't exist***********
\documentclass{article}
%% Deutsche Anpassungen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[ngerman]{babel}
\begin{document}
\centering
\begin{table}
\caption{ }
\begin{tabular}{l l}
TAL& \input{./TFout_1.tex}
\end{tabular}
\end{table}
\centering
\InputIfFileExists{TFout_1.tex}
{
\begin{table}
\caption{ }
\begin{tabular}{l l}
\InputIfFileExists{TFout_1.tex}
\end{tabular}
\end{table}
}
\centering
\InputIfFileExists{TFout_1.tex}
{
\begin{table}
\caption{ }
\begin{tabular}{l l}
\InputIfFileExists{TFout_2.tex}
\end{tabular}
\end{table}
\end{document}
Contents of file TFout_1.tex:
\begin{small}\begin{tabular}{|C{2cm}|C{2cm}|C{2cm}|}
\hline
\textbf{Datum}&\textbf{Grenzwert}&\textbf{Trend}\\\hline
06.12.2012 04:04&-20&Unterschritten\\\hline
06.12.2012 04:19&-20&Unterschritten\\\hline
\end{tabular}
\end{small}