I am trying to work with files which needs to be used for downstream processing. The files in the subdirectory structure and the filenames are somewhat like :
- ./resources/json
-pdfextract_1_pdf.json
-pdfextract_4_pdf.json
-pdfextract_3_pdf.json
-pdfextract_2_pdf.json
When I just try to sort just the files in the subdirectort ./resources/json. It works.
mylist = ['pdfextract_2_pdf.json','pdfextract_3_pdf.json','pdfextract_1_pdf.json']
mylist.sort()
This one seems to be not working. Eventhough everything looks similar (just a string)
['pf1109__r_td6831__425_a_b_c.pdf.page33.pdf_testing_xml.json', 'pf1109__r_td6831__425_a_b_c.pdf.page4.pdf_testing_xml.json', 'pf1109__r_td6831__425_a_b_c.pdf.page41.pdf_testing_xml.json']