Sorted:
In Photoshop's File/Scripts/Image Processor, you simply have to put in 2048 (or whatever size you want the long side of the image to be) in BOTH boxes.
Photoshop then makes the long side 2048, while scaling the short side to retain the aspect ratio.
It does this whether the image is portrait or landscape format.
Brilliant!
D.