I have a folder with a lot of PDF files that I need to rename and order based upon the date in the file name. The files are named as follows and are either "Contractual" or "Drugs (Prescribing)" followed by the date "30Nov22" and the last two number "00" "01" "02", denote if there are multiple pdf's for that particular month. (Examples below).
Contractual30Nov2201
Contractual11Aug2201
Contractual31Aug2202
Drugs (Prescribing)09Sep2200
Drugs (Prescribing)10May2301
Drugs (Prescribing)11Jul2302
I am trying to get an output would allow me to have a file of PDFs that are in month and year order and split between contractual and drugs. So for the above examples the output would look something like
1. Contractual - Aug-22 - 1
2. Contractual - Aug-22 - 2
3. Contractual - Nov-22 - 1
4. Drugs - Sep-22 - 0
5. Drugs - May-23 - 1
6. Drugs - Jul-23 - 2
Any help would be much appreciated!