ArchivedTools/ScanScripts/Windows/1 - Make booklet.cmd
2023-12-21 01:48:37 +01:00

41 lines
552 B
Batchfile

@echo off
set source=D:\Retro-Work
setlocal EnableDelayedExpansion
set folder=%cd%
cd work\out
copy %source%\make_booklet.php .\ /y
php -f make_booklet.php
cd odd
)
if NOT EXIST output mkdir output
for %%i in (*.tif) DO (
echo Converting %%i
convert %%i output\%%~ni.pdf
)
cd output
pdftk *.pdf cat output "%folder%\_odd.pdf"
rem del *.pdf /q
cd %folder%\work\out\even
)
if NOT EXIST output mkdir output
for %%i in (*.tif) DO (
echo Converting %%i
convert %%i output\%%~ni.pdf
)
cd output
pdftk *.pdf cat output "%folder%\_even.pdf"
pause