Batch Merge multiple bitmap files

Hi,

is there a way to batch merge multiple bitmap files located in different folders:

FOLDER 1:                 FOLDER 2:

object_001.cpt           background_001.cpt

object_002.cpt           background_002.cpt

object_003.cpt           background_003.cpt

We need to merge files according to their numbering - "object_001" from Folder 1 needs to be merged with "background_001" in Folder 2 - can this be done in PhotoPaint or any application / tool / script / macro / plug-in?

So far we do it manually - open "background-001" and import "object_001". We  tried dragging files, having all of them opened, but that messes up the location of objects in respect to each other - only importing puts objects perfectly in place.