# Batch Merge to PDF

**URL:** <https://boards.straightdope.com/t/batch-merge-to-pdf/600935>\
**Category:** Factual Questions\
**Created:** [October 27, 2011, 2:29am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935 "2011-10-27T02:29:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saintly\_Loser](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saintly_loser/32/4045_2.png) [@Saintly\_Loser](https://boards.straightdope.com/u/Saintly_Loser)\
**Post date:** [October 27, 2011, 2:29am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/1 "2011-10-27T02:29:48Z")

</div>

Here’s the task at hand:

I have a number of folders on my hard drive, named 01, 02, 03, etc. Each folder contains a number of .tif files. I would like to merge all of the .tif files in a folder into one .pdf, and repeat for each folder. The resulting .pdf could be named anything, it doesn’t matter.

Acrobat X can do this with one folder just fine. Select “Create” and then “Combine Files Into a Single PDF” and it does it perfectly.

But what I’d like to do is run this all in a batch, so I don’t have to do each folder one by one. However, if I select multiple folders, it combines all files from all folders into one .pdf. This isn’t what I need – I need one .pdf per folder.

Any thoughts?

Need answer fast, as they say.

---

<div class="post-metadata">

**Author:** ![Sunspace](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sunspace/32/1250_2.png) [@Sunspace](https://boards.straightdope.com/u/Sunspace)\
**Post date:** [October 27, 2011, 2:38am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/2 "2011-10-27T02:38:31Z")

</div>

Can you make Acrobat X loop across multiple folders using Automator or Applescript? (Or on Windows, something like PowerShell or AutoIt?)

---

<div class="post-metadata">

**Author:** ![Saintly\_Loser](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saintly_loser/32/4045_2.png) [@Saintly\_Loser](https://boards.straightdope.com/u/Saintly_Loser)\
**Post date:** [October 27, 2011, 2:43am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/3 "2011-10-27T02:43:44Z")

</div>

> [@Sunspace](#):
>
> Can you make Acrobat X loop across multiple folders using Automator or Applescript? (Or on Windows, something like PowerShell or AutoIt?)

Probably, and there are all kinds of add-ins and utility programs out there, but I don’t have them now, and can’t download one (network admin won’t permit it, and I can’t get an exception right now).

So I’ve got about a hundred of these folders, and either I have to sit here all night and do them one by one, which will take hours, or figure out a way to batch this, set it up, and go home.

---

<div class="post-metadata">

**Author:** ![Asimovian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/asimovian/32/172_2.png) [@Asimovian](https://boards.straightdope.com/u/Asimovian)\
**Post date:** [October 27, 2011, 2:50am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/4 "2011-10-27T02:50:11Z")

</div>

Forgive me because I haven’t used Acrobat in a while – my office uses a competitor named Nuance that is extremely similar. With Nuance (and, I thought, with Acrobat, but it has been a while), you can set up one batch, and it’ll begin processing that batch as a single “job”, but you’re still free to set up other jobs. So it can handle queuing while processing. Do you know offhand if Acrobat locks you out from creating another job once it’s already working on one?

I realize this isn’t the same thing as having Acrobat do a mass batch job, but if you can at least queue all the individual jobs up at once rather than having to wait for one to finish before queuing the next one, that still saves some time.

---

<div class="post-metadata">

**Author:** ![Saintly\_Loser](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saintly_loser/32/4045_2.png) [@Saintly\_Loser](https://boards.straightdope.com/u/Saintly_Loser)\
**Post date:** [October 27, 2011, 2:55am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/5 "2011-10-27T02:55:04Z")

</div>

> [@Asimovian](#):
>
> Forgive me because I haven’t used Acrobat in a while – my office uses a competitor named Nuance that is extremely similar. With Nuance (and, I thought, with Acrobat, but it has been a while), you can set up one batch, and it’ll begin processing that batch as a single “job”, but you’re still free to set up other jobs. So it can handle queuing while processing. Do you know offhand if Acrobat locks you out from creating another job once it’s already working on one?
> 
> I realize this isn’t the same thing as having Acrobat do a mass batch job, but if you can at least queue all the individual jobs up at once rather than having to wait for one to finish before queuing the next one, that still saves some time.

Can’t do it. At least not this kind of job. While it’s processing one bunch of files, you can’t do anything.

---

<div class="post-metadata">

**Author:** ![Sunspace](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sunspace/32/1250_2.png) [@Sunspace](https://boards.straightdope.com/u/Sunspace)\
**Post date:** [October 27, 2011, 2:57am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/6 "2011-10-27T02:57:43Z")

</div>

Are you on OS X or Windows? On the Mac, Automator and Applescript come built in. On Windows, PowerShell is built in… I _think_.

Edit: yes it is.

---

<div class="post-metadata">

**Author:** ![Sunspace](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sunspace/32/1250_2.png) [@Sunspace](https://boards.straightdope.com/u/Sunspace)\
**Post date:** [October 27, 2011, 3:01am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/7 "2011-10-27T03:01:03Z")

</div>

[Windows PowerShell](http://en.wikipedia.org/wiki/Windows_PowerShell)  
[Automator](http://en.wikipedia.org/wiki/Automator_%28software%29)  
[AppleScript](http://en.wikipedia.org/wiki/AppleScript)

---

<div class="post-metadata">

**Author:** ![Saintly\_Loser](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saintly_loser/32/4045_2.png) [@Saintly\_Loser](https://boards.straightdope.com/u/Saintly_Loser)\
**Post date:** [October 27, 2011, 3:13am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/8 "2011-10-27T03:13:07Z")

</div>

> [@Sunspace](#):
>
> Are you on OS X or Windows? On the Mac, Automator and Applescript come built in. On Windows, PowerShell is built in… I _think_.
> 
> Edit: yes it is.

Yes, it’s there. It would take me quite some time to figure out how to write a script that would get Acrobat to do what I want (if that’s even possible). That’s a bit beyond me tonight, I’m afraid, but thanks anyway.

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [October 27, 2011, 8:11am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/9 "2011-10-27T08:11:20Z")

</div>

This is trivial to do from the command line using [ImageMagick](http://www.imagemagick.org/). To combine all TIFF files in a directory into a PDF, just type something like

```auto

convert *.tiff output.pdf

```

You can use your OS’s shell to do this for several directories at a time. Here’s an example with bash which assumes that you’re in a directory which contains nothing but subdirectories full of TIFF files:

```auto

for d in *
do
  convert "$d"/*.tiff "$d".pdf
done

```

If you’re using Microsoft Windows then a batch file to do the same thing would be of similar complexity.

---

<div class="post-metadata">

**Author:** ![ardanus](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@ardanus](https://boards.straightdope.com/u/ardanus)\
**Post date:** [February 25, 2012, 7:01pm UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/10 "2012-02-25T19:01:56Z")

</div>

Hi,

my problem is exactly the same like Saintly Loser’s, but I’m running Win7 x64, not OS. I have absolutely no experience in using the windows command shell - and all I need is a batch equal to the one already posted here for several directories at OS. If there’s someone here who could easily do this for me within seconds, I would be much oblieged… I think this would help many other users as well…

thank you very much so far! 🙂

---

<div class="post-metadata">

**Author:** ![Dewey\_Finn](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dewey_finn/32/4222_2.png) [@Dewey\_Finn](https://boards.straightdope.com/u/Dewey_Finn)\
**Post date:** [September 13, 2013, 2:09am UTC](https://boards.straightdope.com/t/batch-merge-to-pdf/600935/12 "2013-09-13T02:09:09Z")

</div>

Reported.
