Document Tags not working

Advanced Renamer forum
#1 : 03/03-25 15:18
Kim KNight
Posts: 2
I am trying to add the the number of pages in a PDF using the "Add" + <Pages:xxx> and it is only adding the number in the first pdf not the other 5 total:

3NB_10_2_NoticeOfSuccessfulOECompletion_710960_CASHOP_02182025.pdf
NB_10_2_NoticeOfSuccessfulOECompletion_710962_CASHOP_02182025.pdf
NB_10_2_NoticeOfSuccessfulOECompletion_711045_CASHOP_02182025.pdf
NB_10_2_NoticeOfSuccessfulOECompletion_711059_CASHOP_02182025.pdf
NB_10_2_NoticeOfSuccessfulOECompletion_711069_CASHOP_02182025.pdf


Also is there a way to add a space between the "3" and the "NB"?
#2 : 03/03-25 19:12
Delta Foxtrot
Posts: 436
Reply to #1:

Hi Kim,

I can confirm the problem. I got 2 page numbers out of 6 pdf files. I'd never used that tag before! :)

As to adding a space, you can simply put a space after the <Pages> tag, but then of course if you don't get the page numbers you'll end up with files that start with a space. A safer way would be to add a Replace method after the Add method and use a combination that keys off something else in your filename. For instance, if you always have two capital letters and an underscore in the original title, you can use this (without the quotation marks):

Replace: "^(\d+)([A-Z]{2})_"
Replace with: "$1 $2_"
Use regular expressions CHECKED

That way requires a number at the filename start, followed by two capital letters and an underscore. Otherwise nothing is changed.

BTW, if you want to pad the page numbers with zeros to 3 places, use <Pages:3> instead of <Pages:xxx>, the User Guide on that is wrong.

Best,
DF

edited: 03/03-25 19:14
#3 : 04/03-25 20:40
Kim KNight
Posts: 2
Reply to #2:
Thank you for the info...hope they can get this fixed soon...
#4 : 10/03-25 11:53
Kim Jensen
Administrator
Posts: 962
Reply to #3:
I'm releasing version 4.09 including a fix for this issue within a few days.