A Windows batch file that uses imagemagick to generate thumbnails of the first page of PDFs.
We have a folder with PDFs. The batch file will generate a JPG file of the first page of every PDF, recursively, including any subfolders with PDFs. The filename of the JPG will be the same with the PDF.
Windows batch file
Place the .bat file in folder root and run it.
- The filenames and folder names can contain spaces, greek letters and special characters. They will be processed with no problem.
- Every thumbnail will be saved in the same folder as the PDF.
- The generator will show every conversion and at the end, it will display start and end time for informational purpose.
Start | End |
---|---|
![]() |
![]() |
Before | After |
---|---|
![]() |
![]() |