You would need to create an action first to resize your photos. I suggest splitting the portrait and landscape photos first and then creating an action for each format. Then go to File > Automate > Batch. Under source have it set to folder, locate you folder where it says choose, then go to the action drop-down menu and select the appropriate action that you created for resizing. Create another folder if you wish to have the resized jpgs in another folder, select that in the destination section where it says choose, make sure you got folder selected in the destination drop-down menu. For errors you've got two options, stop for errors and create a log file for errors, you can decide which one you want there. Press OK and that's it.
THE PHOTOGRAPHER'S PRAYER; If I should die, O Lord, please don't let my wife sell the camera equipment for what I told her it cost us!!