Skip to content

Instantly share code, notes, and snippets.

@jared
Created August 21, 2009 19:29
Show Gist options
  • Save jared/172352 to your computer and use it in GitHub Desktop.
Save jared/172352 to your computer and use it in GitHub Desktop.
#! /usr/bin/env ruby
if !ARGV[0]
puts "Usage: append_jpg.rb path-to-naked-files"
exit
end
dir = Dir.open(ARGV[0])
files = []
dir.each do |f|
system("mv #{f} #{f}.jpg") unless f =~ /\.+/
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment