How can I sort files in a directory by a non-beginning part of the filename field?
This question is similar to post on "Custom file sort order for paperless office," except I want to sort by filename "subfields." For instance in some documents representing transactions I name the files as follows: 20090731 (8 digit date)Debit_account (with underscores not spaces)Credit_accountamount ($241.35). I would like to be able to sort by the amount, which would be the 4th space delimited field. Example: "20090731 WF_Savings US_Bank $1322.43 txfr.pdf"
I would like to be able to sort by, say, the amount subfield. Seems like there should be a way to do that using a regular expression,
such as in the rename function, so that in this case the sort key could be
captured part of the pattern: "[^ ]+ [^ ]+ [^ ]+ ([^ ]+) .*". Or perhaps using two sets of parentheses to define two sort capture fields and then express their order as "\2\1" or something similar.
I've thought of some ways this could be implemented:
Such as add an expression in the filter, after a regular expression to indicate a field to sort by?
Allow specification of a subfield delimiter in the filename field (or description) and then allow sorting by a designated subfield.
I know that I can create a temporary directory with selected files, copy the desired files to it, rename them with a preset regular expression to make the desired sort subfield to be first and then sort them.
If there's something in Dopus that already does this, I'll be delighted to hear about it or any other suggestions.