Count back n amount of filename revisions
Posted: 10 Nov 2018 01:00
I have tens of thousands of files that need to be sifted through and at times will need the last n amount of revisions for several different filenames. Is there a way to count backward from the latest revision of a file to get the latest or the latest and n amount of files from the latest?
File schemes look like below, and the revision is always after the tilde '~'. Extra problems are the revisions start as a dash '-' and work their way up the alphabet: -, a, b, c, -> aa, ab, ac, etc. But there could also be: -, a, b, b1, b2, c, d, -> aa, ab, ac, etc.
I can make the input selection for selecting the filenames that I need, along with the input for it to ask how many revisions back I want to go. I just can't figure out how to have it find the latest revision for the file(s) and count back the amount of revisions and select them.
File schemes:
filename001~-.txt
filename001~a.txt
filename001~b.txt
filename001~c.txt
filename001~c1.txt
filename001~d.txt
filename001~e.txt
filename001~e1.txt
filename001~e2.txt
filename001~f.txt
filename001~g.txt
|
filename001~aa.txt
filename001~ab.txt
filename001~ac.txt
filename002~c.txt
filename002~d.txt
filename002~e.txt
filename002~f.txt
filename002~g.txt
filename002~h.txt
filename002~i1.txt
filename002~j.txt
|
filename002~aa.txt
filename002~ab.txt
filename002~ac.txt
If anyone can figure that out, that would be amazing.
Thank you!
File schemes look like below, and the revision is always after the tilde '~'. Extra problems are the revisions start as a dash '-' and work their way up the alphabet: -, a, b, c, -> aa, ab, ac, etc. But there could also be: -, a, b, b1, b2, c, d, -> aa, ab, ac, etc.
I can make the input selection for selecting the filenames that I need, along with the input for it to ask how many revisions back I want to go. I just can't figure out how to have it find the latest revision for the file(s) and count back the amount of revisions and select them.
File schemes:
filename001~-.txt
filename001~a.txt
filename001~b.txt
filename001~c.txt
filename001~c1.txt
filename001~d.txt
filename001~e.txt
filename001~e1.txt
filename001~e2.txt
filename001~f.txt
filename001~g.txt
|
filename001~aa.txt
filename001~ab.txt
filename001~ac.txt
filename002~c.txt
filename002~d.txt
filename002~e.txt
filename002~f.txt
filename002~g.txt
filename002~h.txt
filename002~i1.txt
filename002~j.txt
|
filename002~aa.txt
filename002~ab.txt
filename002~ac.txt
If anyone can figure that out, that would be amazing.
Thank you!