>>999
Back when I was into /pretend/ing more I just sorted by girl. I never had large enough galleries or enough time to sort that deeply.
Anyway, I would suggest something like: HCCL(Or ND)MD#. Basically Just Hair color, clothing status, mood, and then a number for which it was in a series.
For example: A girl with red hair who was naked with a smile on her face as well as being the third pic of that type would be RDNDHP3. Perhaps that could work? If you don't sort by girl you could write it as MariaRDNDHP3 if you gave that girl the name of "Maria."
As for the pictures, I think that a kinda simple program in Python could do the trick. Have the user select a directory and the program would flip all of the pictures. That being said, I don't really know how simple that would be to program and I also don't know how to program in Python. So…eh. Maybe if I ever get around to learning it I'll work on that.