#1 : 30/09-24 22:00 Shaun Toole
Posts: 2
|
Someone posted about copying a part of a date from one place in a file name to another. I have a different need: I need to copy a non-date number to the first position of the name of each of 13 files.
I work with audiobooks, and most of my use of Advanced Renamer applies to the chapters of audiobooks. Each file contains one chapter. The chapter number is in every file name. In most cases, there's a sequence number in the first position of a file name. In rare cases, there is no sequence number. Because there are two narrators, the files from each person are not sequential chapters. I have to copy the chapter number from the 14th and 15th position of the file name to the first two positions WITHOUT REMOVING THE CHAPTER NUMBER FROM ITS PLACE IN THE FILE NAME. The Move method will put the number where it needs to be, but it also removes it from its original position. example: Tom Sawyer_chapter01_narration.wav needs to become: 01_Tom Sawyer_chapter01_narration.wav How can this be accomplished in Advanced Renamer? Best, Shaun |
#2 : 30/09-24 22:44 Delta Foxtrot
Posts: 324
|
Reply to #1:
Hi Shaun, There are a number of ways this could be accomplished; I'd use a Replace method personally. By the way, unless I'm counting wrong, the two-digit number is not in the 14-15 position (but that shouldn't matter). The real question is, do you have any filenames that have OTHER numbers in addition to the chapter numbers? If so we may have to adjust the method to take that into account. Anyway, this works on your example: REPLACE method: Replace: ^([^\d]+)(\d+) Replace with: $2_$1$2 Use regular expressions: CHECKED Apply to: Name (no spaces in the text fields) Let us know if your preview of the files contains files that would be renamed incorrectly or not renamed at all. More examples would be great in that case. :) Best, DF |