Daniel Barrett wrote:
Or is there a better method? Remember that wiki "B" is active and not a new, empty wiki.
I don't think there is any maintenance script which does what you need to do. Similar image move operations from the Wikipedias to Wikimedia Commons were just done using semi-automated client-side scripts, with image history not preserved.
Would a shared repository approach be enough for your needs? (instead of moving all images from A to B, have them on another wiki, but making them accessible from B using a sharedrepo)