ImageMagick is quite handy tool for batch image conversion from command line.
Let’s say that there are 50 photos in one directory. We want to fix orientation based on Exif info and shrink images to 50% of size. We can achieve it by this shell command:
for i in *.jpg; do convert -auto-orient "$i" -resize 50% "$i"; done
If you need version for Windows then I recommend installing Cygwin.