Do the file names have any symbols from the illegal character list. You can check your settings by going to:
Edit >> Preferences >> File Handling (tab)
Lightroom >> Preferences >> File Handling (tab) on Mac OSX
Also do they contain an extra period e.g. IMG_1234.NewYork.tif
yep, file names do not contain illegal characters. The filenames are John-1234567 (correct sample), John-12344567-PS and John-8901234-PS. Last two files are originally PSD files, the first file is a 3FR file (RAW for Hasselblad).
I think the problem is using original file number as the EXIF will be different to the file name saved in Photoshop.
In the export dialog click to the right of Rename to: (on the dropdown word custom settings) and choose Edit
In the template editor clear the existing fields choose Custom Name and click the insert button. Next choose Filename and click the insert button.
See image below. I’ve used the custom name London as an example in the export dialog. See if that works.
Actually, I just played with that. I selected custom (insert) and then Filename (insert), and saved it as a preset. Then I went back to the main export, I actually selected (by accident) Custom Settings, instead of the new preset. Tried again, and it exported correctly for all files in the batch. Interesting how that worked. I see some opportunities for preset export settings (e.g. for facebook, 500PX, FLickr, and for other applications the export settings could be completely different).