files = Dir.glob('*.csv')
files.each do |f|
src = File.open(f, "r")
header = src.readline.chop
out = File.new("header/#{f}", "w")
out.puts(header)
i = 0
while !src.eof? do
out.puts(src.readline)
i += 1
break if i > 100
end
src.close
out.close
end