Increment numbers in filenames in 10.5's Finder

As you probably know, there are many ways to duplicate files in the Finder. You can copy (Command-C) and paste (Command-V), Option-drag the file, or Control-click on the file and choose Duplicate from the contextual menu (or just press Command-D).

In the OS X 10.5 Finder, however, the naming of the copied file varies depending on which of the above methods you use to copy the file (this only works in 10.5, though). If you use Command-D (or Duplicate), or copy and paste, then Finder will append copy to the end of the filename. If the file’s name already ends in copy, Finder will then append a number to differentiate the copied file.

However, if you Option-drag the file, Finder will treat it differently, depending on how it was originally named. If the file’s original name ends with a word, or a word-number combo (i.e. somefile or somefile5), then Finder will append a number (instead of appending copy). However, if the file’s name ends with a number that stands apart from the file’s name, then Finder will increment that number—so somefile 5 will become somefile 6 when you use Option-drag to create the copy.

You can use this little trick whenever you want to duplicate a file—or many files—and increment their filenames. Just select all the files, Option-drag them, and the duplicates will be created with incremented numbers in their filenames. Thanks to Mac OS X Hints reader ecbtln for submitting this interesting tidbit about copying files in the OS X 10.5 Finder.

Shop Tech Products at Amazon