Show All Projects
There are plenty of ways to create multipage tiff files, but I couldn't find a low effort way to take a large number of folders full of single page tiffs and convert each to a multipage tiff. The following is a batch script which will call IrfanView to do this recursively. Place the script in the root folder which contains the subfolders of tiffs. The result multipage tiffs will be created in the root folder named by folder.

Be aware that be that this is accomplished by appending pages. So running the script again while the output files are still in the root folder will lead to a seconds set of images appended to the same multipage tiff.

@echo off

REM use ! instead of % for delayed variable expansion in for loops
setlocal enabledelayedexpansion

REM Pitfalls of multiline syntax:
for /R %%a in (*.tif) do (
REM For and file variable syntax:
echo Single page tiff: %%~a
set joined=%%~pa

REM Replace path slashes with dashes:
set joined=!joined:\=-!

REM Remove both ends:
set joined=!joined:~1,-1!

REM add root path and extension
set joined=%cd%\!joined!%%~xa
echo Appended to: !joined!

"C:\Program Files (x86)\IrfanView\i_view32.exe" %%a /append=!joined! /killmesoftly /silent