I need to count the total number of pages in a big directory with thousands of pdf files.
First I need to be sure that the criteria is: pdf of the year 2020, month does no matter. In my code below you can see that I used *_2020_??.pdf what means that any sign before _2020_ may been used and after _2020_ there is again the possibility for 2 digits.
Background: naming of the pdf files is e.g. 12345_2020_11.pdf what means: name of the file is 12345 of the year 2020 of the month 11.
I found a code on the internet but it seems not to work. It stops after adding the heading titles File Name and Pages, and then there is no further progress at all or it stops without showing error message.
Conclusion after testing is: the script is ONLY looking in the root directory, not in subfolders. So I need some help to integrate code to search in all subfolders.
Bookmarks