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
share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.