Skip to content

Instantly share code, notes, and snippets.

@jnstq
Created May 6, 2009 10:21
Show Gist options
  • Save jnstq/107470 to your computer and use it in GitHub Desktop.
Save jnstq/107470 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'pathname'
dirname = Pathname.new("/Users/jon/Dropbox/Equipe Windows Server/trans")
File.open("/Users/jon/tmp/kvitto-0224-0303.txt", "w") do |output|
%w(4548 4550 4551 4552 4555 4556 4557 4558 4559 4560 4562 4565 4566 4567 4568 4569 4570 4572 4573 4574 4575 4576 4579 4580 4581 4583 4584 4585 4587 4588).each do |tran_id|
if dirname.join("#{tran_id}.txt").exist?
output.puts File.open(dirname.join("#{tran_id}.txt")).read if dirname.join("#{tran_id}.txt").exist?
output.puts ""
else
puts "finns inte #{tran_id}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment