From: cristian cristian Date: 2012-04-19T21:33:11+09:00 Subject: Re: Converting CSV Thank you! Both examples works great! How can I use an array of file names from the directory to use it when creating the new csv's? I was thinking something like this: files = Dir.glob("*.csv") files.each |filename| file.open (filename+"_converted.csv",'w') do |csv| new_csv = File.read(filname).gsub(/[^\n\r;]+/,'"\0"').gsub(';',',') csv.print new_csv end end Br cristian -- Posted via http://www.ruby-forum.com/.