From: Jun Young Kim Date: 2009-02-24T15:43:36+09:00 Subject: Re: append static text for all files in a directory If your code is normally executed, the following code will give you some hint. Dir.glob("*.rb") do |file| puts file end 2009. 02. 24, ¿ÀÈÄ 3:16, Srinath A. ÀÛ¼º: > How to append static text for all files in application . > I want to append comment lines on top of each file in app/controllers/ > > how can iterate and append in the app ? > > I used this for single file : > > filename = File.open("application.rb","a") do |f| > f.puts "append to file"; > f.close(); > end > > > > thanks !! > -- > Posted via http://www.ruby-forum.com/. > >