searching using OR functionality

Advanced Renamer forum
#1 : 11/01-16 16:30
Paul Harris
Paul Harris
Posts: 2
Hi there

I just wondered someone could help me.

I use Advanced Renamer to remove certain images in a sequence. The images are all named as an 8 digit string, based on the time they were take, mmddhhmm (month month day day hour hour minute minute).

I use the program to identify and rename images based on the 5th and 6th digits (the hour).

So to remove images taken between 8am and 9am, the search string I use is ….08..

It works great, but I may need to delete images taken at 08, 09, 10 and 11 and I’m currently searching for and renaming each hour individually, which takes quite a lot of time.

Is there a way that I can search for the 5th and 6th digits using something like an OR function, eg something like ….(08 OR 09 OR 10 OR 11).. so it identifies and renames any images where the 5th and 6th digits are either 08, 09, 10 or 11 in one go?

Hope that makes sense and I hope someone can help.



11/01-16 16:30
#2 : 13/01-16 10:30
Posts: 92
Try this replace method:

Text to be replaced: ^(\d{4})(08|09|10|11)(\d{2})
Replace with: _TO_DELETE_$1$2$3
Use regular expression: Tick
Apply to: Name

The text to be replaced can be summarized as: beginning at the start of the filename [that's the '^' symbol'], look for any 4 digits ['\d{4}'], followed by either 08, 09, 10 or 11 ['08|09|10|11'], and finally another couple of digits.

Replace this with a prefix string '_TO_DELETE_' followed by the original filename ['$1$2$3']. Note $1, $2 and $3 represent groups:
- the first group is '(\d{4})', i.e. the first four digits
- the second group is '(08|09|10|11)', i.e. list of hours
- the third group is '(\d{2})', which is the minutes

The files matching this pattern will be changed to this new name, and that should make it easy to identify them to then bulk delete from explorer or whatever.

01010901.jpg -> _TO_DELETE_01010901.jpg

13/01-16 10:30 - edited 13/01-16 10:37
#3 : 14/01-16 12:30
Paul Harris
Paul Harris
Posts: 2
Thank you so much, it works perfectly and will save me A LOT of time.

I'll be sure to make a donation

Thanks again


14/01-16 12:30