Count files inside a comic book

You can calculate the number of files below an archive in the script without relying on file display columns:

var filePath = "C:\\My Test Folder\\Fo.ols.cbz";
var fileCount = FileCountRecursive(filePath);
DOpus.Output("File count = " + fileCount);

function FileCountRecursive(filePath) {
	var fileCount = 0;
	var folderEnum = DOpus.FSUtil.ReadDir(filePath, "r");
	while (!folderEnum.complete) {
		var folderItem = folderEnum.Next;
		if (!folderItem.is_dir) {
			++fileCount;
		}
	}
	return fileCount;
}