On 2010-12-29 22:05:23 +0100, w_a_x_man said:
> 
> require 'ftools'
> 
> HEADER = '\input{Vorspann.ltx}
> 
> \begin{document}
> 
> %s
> \end{document}
> '
> 
> File.makedirs( "new" )
> 
> Dir[ "*.tex" ].each{|fname|
>    text = IO.read( fname )
>    text2 = HEADER % text
>    File.open( "new/" + fname, "wb" ){|fh|
>     fh.print text2
>   }
> }

With ruby 1.9, the only thing to change, is to use  fileutils instead 
of ftools  ?

AM