I have long used my own Java program for sorting and adjusting photos, but now I have found a better solution: jhead for Linux. Combining it with Dropbox and a cron job I can get my uploaded images, move them out of Dropbox (to save space online, I don’t pay and I like to keep my data close), rotate if needed and sort into folders by year, month and day. The jhead command is simple:
jhead -n%Y/%m/%d/%f -autorot -exonly *.*
This sorts photos by the date taken and rotates them as needed. Images without creation date are left in the main folder for manual sorting.