使用批处理文件打开多个PDF文档 [英] Opening multiple PDF documents using batch file
问题描述
我正在尝试使用一个简单的批处理文件打开多个PDF文档:
I am trying to open several PDF documents using a simple batch file:
ECHO OFF
CLS
cd Program Files\Adobe\Reader 9.0\Reader
Acrord32.exe C:\Users\BW1.pdf
Acrord32.exe C:\Users\BW2.pdf
Acrord32.exe C:\Users\BW3.pdf
Acrord32.exe C:\Users\BW4.pdf
Acrord32.exe C:\Users\BW5.pdf
Acrord32.exe C:\Users\BW6.pdf
EXIT
上面的批处理文件仅打开第一个PDF,然后等待直到我关闭它以打开下一个PDF文件。如何同时打开所有PDF文档? (例如转到Acrobat Reader,文件-> Open-> xx.pdf)
The above batch file opens the first PDF only, then waits until I close it for the next PDF file to open. How can I have all the PDF documents open at the same time? (Like going to Acrobat Reader, file->Open->xx.pdf)
推荐答案
使用开始
:
start acrord32.exe 1.pdf
start acrord32.exe 2.pdf
start acrord32.exe 3.pdf
甚至(如JohannesRössel在评论中建议的那样)
Or even (as Johannes Rössel suggests in the comment below):
start 1.pdf
start 2.pdf
start 3.pdf
可能也可以工作(取决于您的默认PDF查看器)。
Would probably work as well (depending on your default PDF viewer).
请注意,在使用 start
时,使用带引号的引数时必须小心,因为以下命令不起作用(第一个带引号的引数被解释为标题(对于新的控制台窗口):
Note that when using start
you have to be careful when using quoted arguments, as the following won't work (the first quoted argument is interpreted as the title for a new console window):
start "1.pdf"
相反,您必须执行以下操作:
Instead you'll have to do the following:
start "" "1.pdf"
这是一个令人讨厌的 start
,但是您必须有效地提供哑巴我的标题在这种情况下可以正确打开指定的文件(即使标题是不必要的,因为这不会创建新的控制台窗口)。
It's an annoying quirk of start
, but you have to effectively supply a dummy title in this case to properly open the specified file (even though the title is unnecessary as this won't create a new console window).
这篇关于使用批处理文件打开多个PDF文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!