Match a file if its regex occurs only once?

Advanced Renamer forum
#1 : 05/10-12 19:17
Jeff Rose
Jeff Rose
Posts: 3
I'm in the process of moving a large collection of files by a couple of keywords that I'm generating regular expressions for, and one of the things I need to do is isolate occurrences of doubles (any group of 2 or more files that match the same regex).

I'm using the command line version of Advanced Renamer by generating a batch file to run a single long regex. It looks something like this:

(20120101_[0-9]{4}_0000001\.(lsx|xml))|(20120101_[0-9]{4}_0000002\.(lsx|xml)) ... and so on.

I have tried changing my regex format to the following to get the behaviour I want. That is, to only affect files with exactly one match to the subexpression that matched them:


Unfortunately, this doesn't change the output. Would anyone have any insight into how I can adjust this to get the behaviour I'm looking for? Ultimately, all I want to do is stuff any duplicate matches into a separate folder instead, so they're isolated away from the singleton matches.


05/10-12 19:17 - edited 05/10-12 19:18
#2 : 09/10-12 13:34
Kim Jensen
Kim Jensen
Posts: 756
Reply to #1:
Hmm ... I don't think this is possible without manual work. How many files do you have?

09/10-12 13:34