Count pages in a folder full of .doc files

applescript

I recently found this very helpful link to count the pages in a large folder full of PDF files:

It worked like a dream. Now, however, I need to do the same for a folder full of Word files. Does anyone know how I change the script provided in that link to do that? Or is there some other utility that I can use?

Best Answer

The AppleScript in the linked page queries Spotlight's metadata to get the page count for each PDF document. (Specifically, the kMDItemNumberOfPages value.)

It's up to applications to provide metadata to Spotlight, and MS Word doesn't provide page numbers to Spotlight.

So you can't change the script easily, and will need another method.