Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder of pdf files I am reading, how can I loop through them and open them all?

share|improve this question
up vote 6 down vote accepted

If you really want a loop

for file in *.pdf; do
    open $file

This will open each file in a seperate preview window. To get them all in the same window

open *.pdf

will work as well.

share|improve this answer
how can you open multiple pdfs in the same window? – user27449 May 26 '11 at 22:27
Use the second command above. If you open the sidebar, it will show the individual files. This can be done either from the menu bar, or the "View" menu. Moving you mouse over a multi-page document in the sidebar will allow you to click on the curvy arrow and display each page. You can also page down through each page of all the documents, in order. – KeithB May 26 '11 at 22:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .