I've modified this to append the datetimestamp at the end of the file name (like this game_2018616_74145.xci). I'm not a C developer so the code might not be the most efficient, but it works..
I tried getting the suggestions from SimonMKWii to work, as TitleID would be better, however like I said I'm not a C developer, I code in other languages, and without decent reference material couldn't work it out so defaulted back to appending datetimestamp.
It's honestly for my own use, since I have a bunch of carts I want to backup and don't want to copy them one at a time, posting here just incase somebody else wants to use it.
I tested exfat with and without certificate, fat32 may not work.