Skip to content

Instantly share code, notes, and snippets.

View arjaneising's full-sized avatar

Arjan Eising arjaneising

View GitHub Profile
@arjaneising
arjaneising / shift.rb
Created November 26, 2012 22:10 — forked from derekkraan/shift.rb
Move all files with number greater than argument
def new_filename(num, filename)
if num.to_i < 9
"_0#{num.to_i+1}#{filename}"
elsif num.to_i < 99
"_#{num.to_i+1}#{filename}"
else
"#{num.to_i+1}#{filename}"
end
end