I have a lot of files I\'m trying to rename, I tried to make a regular expression to match them, but even that I got stuck on the files are named like:
dirlisting = DIR.entries('.')
dirListing.each do |file|
num = file.match(/\d+$/).to_i
if num < 100
find the position where start the number, with index and inject the 0 there.
end
end