rnrb

Download:

#
# Place the script in the directory which contains the files to rename.
# Update the whished file extension and number of zeros within the script.
# Start the script by e.g. "ruby rn.rb"
#

file_extension = ".JPG"
number_of_leading_zeros = 5

a = 0
d = Dir.entries(".")
d.sort!
d.each{|x|
	if (x[-4,4] == file_extension) then
		a = a + 1
		puts "got "+x+" "+a.to_s
		system('mv '+x+' '+sprintf("%0"+number_of_leading_zeros.to_s+"d", a)+file_extension )
		end
	}

documentation.txt -> unavailable, yet. Please be patient.
license.txt

This software requires ruby. http://www.ruby-lang.org/

<<< back