How Can I Batch Adjoin Multiple Images From Two Folders?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How Can I Batch Adjoin Multiple Images From Two Folders?

Post by snibgo »

What do the square brackets [] do in 0220100001[].jpg? Do they make any difference?

You might try:

Code: Select all

set FOLDER_A=\blah\blah
set FOLDER_B=\another\blah
set FOLDER_OUT=\out_blah

for %%F in (%FOLDER_A%\02201*.jpg) do (
  if exist %FOLDER_B%\%%~nxF %IM%convert %%F %FOLDER_B%\%%~nxF +append %FOLDER_OUT%\%%~nxF
)
Type "for /f" for help on "for". This script sets %%F to each full filename in turn. %%~nxF is the name and extension, without the dive or directory, of each file.
snibgo's IM pages: im.snibgo.com
Sibrah
Posts: 8
Joined: 2014-04-22T11:03:38-07:00
Authentication code: 6789

Re: How Can I Batch Adjoin Multiple Images From Two Folders?

Post by Sibrah »

Am I repalacing %%F with for /f?
Do i have to expand the for statement further?
.
.
.
I tried the script and it worked. Thanks So much.
Post Reply