I\'m outputting a set of numbered files from a Ruby script. The numbers come from incrementing a counter, but to make them sort nicely in the directory, I\'d like to use leading
Can't you just use string formatting of the value before you concat the filename?
"%03d" % number