puts "hello world\n" Dir["._*"].each do |file| unless file =~ /._(\w|\s)+.rtf/ || file =~ /._(\w|\s)+.webloc/ puts "#{file} renamed" newfile = String.new(file.delete "._") newfile << ".icns" File.rename(file, newfile) puts "Renamed to #{file}\n" end end puts "\n\n"
沒有留言:
張貼留言