From: Gunther Diemant Date: 2011-12-08T17:18:31+09:00 Subject: Re: Rake question Put the transform task definition in front of your each loop. You only create the task inside this loop. task :transform do end my_files.each do |file| file ... task :transform => file end next_file = 'transformed_files.txt' file next_file => :transform do # Do something with all transformed files to produce 1 output file end