Skip to content

Instantly share code, notes, and snippets.

@javascripter
Created December 17, 2008 21:39
Show Gist options
  • Save javascripter/37241 to your computer and use it in GitHub Desktop.
Save javascripter/37241 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# There is a critical bug in this script.Do not use this.
require "pathname"
PATH = "/Users/javascripter/Pictures/adult/"
Dir.chdir(PATH)
Pathname.glob("*").each_with_index {|file, i|
file.rename(i.to_s + file.extname)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment