Acid Magic
Acid Magic

Reputation: 397

Batch print .pdf files from list.txt file

The batch file will be in the same folder with pdflist.txt and .pdf files!

Here is what i want:

In "pdflist.txt" will be file names (not full name) that looks like:

204820

202381

I want to print all files that match text from pdflist.txt

so in my case these files will be printed in adobe acrobat:

598213-M204820.pdf

591111-M202381.pdf

Upvotes: 0

Views: 1092

Answers (1)

npocmaka
npocmaka

Reputation: 57282

For printing directly form you'll need additional script. You can check robvanderwoude's collection.Here I'll be using printjs.bat:

@echo off

for /f "usebackq tokens=* delims=" %%# in ("pdflist.txt") do (
    for /f "tokens=* delims=" %%А in ('dir /b *%%#*pdf') do (
        call printjs.bat "%%~fА"
    )
)

the default printer will be used.

Upvotes: 2

Related Questions