1.

Solve : Batch command for multi files?

Answer»

Hello

i have subdirectory and included much much images
example
Ali_1.jpg ; Ali_2.jpg ; Ali_3.jpg......
HasanOsman_serap_1.jpg ; HasanOsman_serap_2.jpg ; HasanOsman_serap_3.jpg....
Nimet_13_Zehra_1.jpg ; Nimet_13_Zehra_2.jpg ; Nimet_13_Zehra_3.jpg .....

all files SMILAR numarated... for MONTAGE command

i wanna use batch command for montage

my example command for filename = Ali* images

Code: [Select]step-1) montage Ali_1.jpg Ali_2.jpg -tile 1x2 -geometry +0+0 Ali_step1.jpg

step-2) montage Ali_step1.jpg Ali_5.jpg Ali_6.jpg -tile 1x3 -geometry +0+0+0 Ali_step2.jpg

step-3) montage.....

and.. other steps...

file NAME variable in directory...
have much files in here and numarated smilater STYLE

how i can do, how i can MERGE same-named all files on command line?

thx
Launch this in your folder and it will echo the two montage commands for you to check.

If it's ok then add further montage commands and remove the echo and pause statements.

It assumes that there are only filenames with single digits before the .jpg


Code: [Select]@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%a in ('dir *_1.jpg /b ') do (
set "file=%%~na"
set "file=!file:~0,-1!"
echo montage "!file!_1.jpg" "!file!_2.jpg" -tile 1x2 -geometry +0+0 "!file!_step1.jpg"
echo montage "!file!_step1.jpg" "!file!_5.jpg" "!file!_6.jpg" -tile 1x3 -geometry +0+0+0 "!file!_step2.jpg"
pause
)
Thank you very much

i change it

Code: [Select]@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%a in ('dir *_1.jpg /b ') do (
set "file=%%~na"
set "file=!file:~0,-1!"
echo montage "!file!1.jpg" "!file!2.jpg" -tile 1x2 -geometry +0+0 "!file!Step1.jpg"
echo montage "!file!step1.jpg" "!file!5.jpg" "!file!6.jpg" -tile 1x3 -geometry +0+0+0 "!file!Step2.jpg"

)
this style normal

thxIf you want further assistance to change items then please post them in the forum and not in a PM.

Give us some idea of the folder structure so we know if we are dealing with one folder or a folder tree of files,
and if there are any non-English/unicode characters in the filenames or foldernames.



Discussion

No Comment Found