我正在尝试将子文件夹中的多页 tiff 合并到另一个输出文件夹中作为单个图像。基本命令是 convert f:\input*.tif f:\output\image1.tif
我的问题:我没有得到任何输出。出了什么问题
@echo off
setlocal EnableDelayedExpansion
rem Define input and output base folders
set BaseInputDir=F:\Images\input\
set BaseOutputDir=F:\Images\output\
rem Look for all TIF files under inoput folder (and subfolders)
for /F "tokens=*" %%F in ('dir /a /s /b /a-d "%BaseInputDir%\*.tif"') do (
rem Build output subfolder path
set OutputDir=%%~dpF
set OutputDir=!OutputDir:%BaseInputDir%=%BaseOutputDir%!
rem If output subfolder does not exist create it
if not exist "!OutputDir!" md "!OutputDir!"
rem Log that we are converting this file
ECHO Converting "%%~F" to "!OutPutDir!%%~nF.tif"
rem Do the conversion
for /F %%i in ("%%~F") do convert %%i "%BaseInputDir%\*.tif" "!OutPutDir!%%~nF.tif"
)