A solution would be to open Adobe Bridge, navigate to the folder with your images, go to View -> Sort -> By dimensions. Then Bridge will sort your images by pixel-size.
Next up, find the “break point” in size where you’ll start upsizing instead of downsizing and just batch process the ones above.
(The Image Processor (for Photoshop) in Bridge is located in Tools -> Photoshop -> …)