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."