\documentclass{ltxdoc} \nofiles \input{bgteuversion} \GetFileInfo{bgteuversion.tex} \typeout{VERSION \fileversion} \begin{document} \end{document}