简体   繁体   English

批处理文件,将打印目录中的所有文件(.pdf和.docs)

[英]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. 运行Win7,我需要一个批处理文件,该文件将打印特定目录中的所有.doc和.pdf文件。 Any help greatly appreciated! 任何帮助,不胜感激!

First you'll need printJS.bat in the same directory: 首先,您需要在同一目录中使用printJS.bat

@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. 请记住,printJS使用invokeverb函数,如果系统上的语言不同于英语,则该函数可能会失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM