Created
April 10, 2018 21:19
-
-
Save JankyDoodle/d110b41ac5162a263a1db6582dab9ca3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
lines = [] | |
fname = "test4029.csv" | |
somefile = CSV.open(fname, "a") | |
Dir.glob("C:/Ruby24-x64/bin/TxtFiles/*.txt").each do |file| | |
File.readlines(file).each do |line| | |
puts "Processing #{file}" | |
lines << line | |
somefile.puts lines | |
lines.clear | |
end | |
end | |
puts "All finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment