Renumbering images is a common need for getting images to sort in the correct order. For example consider the following list:
DF Studio's Rename Images tool provides the ability to use Regular Expressions to find/replace portions of a name using a pattern. In the list shown above, the problem is that some names need one zero added, but some need two. So, this must be done in two steps.
First, find all of the single-digit numbers:
This will rename image1 to image001 and image2 to image002.
Then, replace the two-digit numbers:
That will rename image10, image11, image12 to image010, image011, image012, making the resulting list:
So how to the find and replace patterns used above work? Without getting too much into the specifics of regular expressions, here is what is being said in the first example: find images that start with "image" followed by a single digit. The parenthesis in (\d) say to "capture" the information to use in the replace. The $ stands for "end of line" or the end of the name. In the replace part, the image name is replaced with "image" followed by two zeros, followed by the part captured in the find. ($1 is the first captured item. Multiple items can be captured and re-used using $1, $2, $3, etc.)
The Rename Images tool provides a Preview New Names button that makes it easy to test your find and replace pattern before committing your changes.http://www.dfstudio.com/blog/wp-content/uploads/2013/02/screenshot-renumberfiles.png