#!/usr/bin/env ruby template = %Q| | dir = ARGV.shift() || exit Dir.new(dir).entries.each do |name| next if name !~ /\.exe$/i temp = template.dup.gsub('%%NAME%%', name) File.open(File.join(dir, "#{name}.manifest"), "wb") do |fd| fd.write(temp) end end