Brandon Elliott
Brandon Elliott

Reputation: 31

Batch file that will print all files (.pdf's and .docs) in a directory

Running Win7, I need a batch file that will print all .doc and .pdf files in a particular directory. Any help greatly appreciated!

Upvotes: 0

Views: 10236

Answers (1)

npocmaka
npocmaka

Reputation: 57282

First you'll need printJS.bat in the same directory:

@echo off
pushd "C:\directory_with_documents"
for %%a in (*.pdf *.doc) do (
   call printjs.bat "%%~fa"
)

and to change the directory at the beginning. Have on mind that printJS uses invokeverb function which may fail if language on the system is different than English.

Upvotes: 2

Related Questions