With
ImageMagick you can use mogrify with the "-resize 600x800>" option. That would resize only images that are more than 600 pixel wide or more than 800 pixel high. If you don't care about the orientation (i.e., if you don't want to resize 800x600 images either), I don't know if there's an option for that, you may have to classify the images in portrait/landscape first.