Skookum’s home page

WordTally

Batch Word-counting and Property-reporting
for Microsoft Word Files

by Peter Donnelly

WordTally is a little Windows utility for batch processing of any documents that can be opened in Microsoft Word, including files in nested folders, to provide a total word count and a couple of document properties.

This isn’t a particularly feature-rich application, but it fills a need. Looking around the Web I wasn’t able to find anything (or at least anything that didn’t cost a lot of money) that did what I wanted: search a folder and subfolders for document names matching a pattern, and provide a sum of their word counts.

An additional feature is that the program creates a report containing a table of the file names, titles, status, and word counts. (The Title and Status properties are text fields that you can set within Word.) If the root folder of the search is writeable, the report is saved there as WordTally.docx. (This file is never included in the count.) Otherwise you are prompted for a name and location.

Screenshot

The interface should be self-explanatory. Provide the path of the root folder and a mask for filtering out files you don’t want to examine. For example, if you’re writing a book and want to count up the words without including research notes etc. that might be in the same folder or folders, you can name the files to be counted Chapter1.docx, Chapter2.docx, and so on, and then in WordTally set the mask to “Chapter*.docx”.

The “Report” option button determines how each filename appears in the output table: as a simple name (without extension), as the simple name with the immediately enclosing folder, or as a full path. Regardless of which option you choose, files are alphabetically sorted by full path and are therefore grouped by folder.

You may experience difficulties if you set the root path to your Documents folder. In Windows 7 at least, this folder contains hidden shortcuts that deny access to the program’s cataloguing function, resulting in overall failure.

Note that the word count for a file might not be the same as shown in the Windows Explorer file properties. Our count is computed by Word itself, but unlike the count given on the Word status bar, it includes the text of footnotes and endnotes. (Programmers may want to know that the Document.Words.Count property available through .NET Framework is yet a different value that seems to include comments as well.)

Finally, I make no guarantee of the robustness or security of the program. As with any application that opens and closes files, there’s always a possibility that files could be left in an unstable state if something goes wrong. Use at your own risk, and do back up.

Download WordTally.zip here. Open the folder and run setup.exe. And if you find the program useful, please consider clicking the button below and throwing five or ten bucks my way.