I don't profess to know the exact answer, but I might be able to point you in the right direction. The command-line utility exiftool (http://www.sno.phy.queensu.ca/~phil/exiftool/) may well be able to do what you want.
In my case I just wanted to find an easier way to caption about 1,500 photos from an overseas trip, using the flexibility of a word processor instead of having to do it one by one in a program like Geosetter.
After renaming the photos, I generated a tab-delimited list of the file names with a blank Description field using this batch file:
==========
rem Dropping a folder on the following .BAT file will create "captions.txt" in the folder:
rem Note that there is a TAB character in the next line between "SourceFile" and "Description"
echo "SourceFile Description" > %1\captions.txt
C:\exiftool\exiftool -T -filename -description -ext jpg %1 >> %1\captions.txt
==========
Then I opened captions.txt in Word (landscape format works best), set a tab stop/hanging indent for easier readability, and typed the captions as required.
I then loaded the resulting file into Excel, saved as a CSV, then used this batch command to write the captions to the files:
==========
C:\exiftool\exiftool -csv=captions.csv -ext jpg .
pause
==========