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.
REM use ! instead of % for delayed variable expansion in for loops
REM Pitfalls of multiline syntax:
for /R %%a in (*.tif) do (
REM For and file variable syntax:
echo Single page tiff: %%~a
REM Replace path slashes with dashes:
REM Remove both ends:
REM add root path and extension
echo Appended to: !joined!
"C:\Program Files (x86)\IrfanView\i_view32.exe" %%a /append=!joined! /killmesoftly /silent