ArchivedTools/ScanScripts/Windows/magazines/Rarely used scripts/rotate - odd-even.cmd
2023-12-21 02:01:29 +01:00

18 lines
321 B
Batchfile

@echo off
setlocal enabledelayedexpansion enableextensions
rem 0 = rotate right the first time, then alternate
set left=0
IF NOT EXIST pages mkdir pages
for %%i in (*.tif) DO (
IF !left! equ 1 (
convert %%i -rotate -90 pages/%%~ni.png
set left=0
) else (
convert %%i -rotate 90 pages/%%~ni.png
set left=1
)
)
endlocal