We can use "find" as well, which should recurse automatically.
Code:
find . -type f \( -name "*.FMT1" -or -name "*.FMT2" \) -exec calibredb add {} \;
And awesomely enough, gfind (renamed) can do this on Windows too, with
https://github.com/bmatzelle/gow
(On Windows, the characters ;() do
not get escaped.)