require "pathname" ports = Pathname.glob("ports/archivers/*/").map { |i| i.basename.to_s } ports.first do |port| puts file = File.read("ports/archivers/#{ port }/pkg/DESCR") puts "ports/archivers/#{ port }/pkg/DESCR" puts "hellooo?" File.exist? "ports/archivers/#{ port }/pkg/DESCR" end => "arc" File.exist? "ports/archivers/arc/pkg/DESCR" => true