\documentclass{minimal}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\begin{filecontents}{testfile.txt}
some random text
\end{filecontents}

\begin{document}

\begin{filecontents}{testfile2.txt}
some random text
\end{filecontents}

\LaTeX\ and AUC\TeX{}\ make a great team.

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
