Mass File Rename - RegEx - Flattening a Directory Tree

Consisting of years worth of digital photos, I had this one huge directory with tens of thousands of files with the following naming scheme:

xyz-nnn-mmm.jpg

where xyz was some text description of the person in the photo ("me," "Susan," "John," etc.), and both nnn and mmm were just sequential numbers.

For example:

Susan-001-001.jpg
Susan-001-002.jpg
Susan-001-003.jpg
Susan-001-004.jpg
...
Susan-002-001.jpg
Susan-002-002.jpg
Susan-002-003.jpg
Susan-002-004.jpg
...

Long story short, because the directory was becoming unwieldy for my photo manager to process, I used DOpus's renaming tool to separate the photos into individual directories using the RegEx expression:

Old name: ([a-z]+)-([0-9]+)-([0-9]+).jpg
New name: \1\\2\\3.jpg

That worked out as intended, of course, but my question is hypothetically, is there a way to do the reverse? Can I re-flatten the directory tree?

With the new "Susan," "John," etc. folders selected, I tried (in test mode) doing the reverse of the above, i.e.,:

Old name: ([a-z]+)\([0-9]+)\([0-9]+).jpg
New name: \1-\2-\3.jpg

But even with the "Rename files in selected sub-folders" option checked, DOpus came back with "0 items affected."

Edit: See Jon's answer below.

The "flatten" won't work using regex, because the "old name" field doesn't see the parent folders. But you can do it using the file information system, e.g.:

Old name: *.jpg
New name: C:\Flat Pictures{parent2} - {parent1} - *.jpg

Set rename type to Standard, and make sure file information fields are enabled.

At first, I thought I was doing something wrong, but after a minute or so, the Output window (again, I'm just in Test mode) finally came back with a "37770 items affected" list. :slight_smile:

Thanks!