'Count Number of Pages in PDF Files of a folder
How can I get the total numbers of pages of pdfs in (sub)folders?
I like to have something in return like this:
c:\pdfs\path1 83
c:\pdfs\path2 12
c:\pdfs\path2\subfolder 3
etc.
With this code below I can get the total of pages of each pdf file. But that is not what I need. I want to get the total of each folder.
REM PDF-Pages.cmd
@echo off
del output.txt
for /r %1 %%f in (*.pdf) do pdfinfo.exe -meta "%%f" >out.txt & echo "%%f",, | tr.exe -d "\r\n" >>output.txt & find "Pages:" out.txt | tr.exe -d "\r\n\055\056\072[:alpha:][:space:]" >>output.txt & echo , | tr.exe -d "\r\n" >>output.txt & find "File size:" out.txt | tr.exe -d "\055\056\072[:space:][:alpha:]" >>output.txt & echo. >>output.txt
del out.txt
Solution 1:[1]
Maybe you can use Pdf Page Count - http://sourceforge.net/projects/pdfpagecount/; but I have no personal experience with this tool. AFAIR, something called like "Multiple PDF page count" also exists, perhaps on Sourceforge, too.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | robertn |