#!/usr/bin/env ruby #Find and show xmp which is not with nef file as the same stem name. #In current dir. #E.g, rm `orphanxmp` #nefs = Dir.glob "*.nef" xmps = Dir.glob "*.xmp" xmps.each do |name| next if File.exist? name.sub("xmp", "nef") puts name end