You could hack something together with the help of the Pillow image library.
First, you would need to install it, ideally into a virtualenv (see also: What is a virtualenv, and why should I use one?):
$ pip install Pillow
Then, assuming your image directory is '/your/images'
(yours will likely be different), you could scan images therein:
>>> import PIL.Image
>>> import pathlib
>>> images = pathlib.Path('/your/images')
>>> for path in images.iterdir():
... # Skip directories
... if not path.is_file():
... continue
... # TODO: Handle image decoding errors.
... image = PIL.Image.open(path)
... size = max(image.size)
... if size > 3000:
... # TODO: Actually move to folder 1.
... print(f'{image} ==> folder 1')
... elif size > 2000:
... # TODO: Actually move to folder 2.
... print(f'{image} ==> folder 2')
...
<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=3840x2160 at 0x7FC9F3E3CD90> ==> folder 1
<PIL.PngImagePlugin.PngImageFile image mode=RGB size=1500x2384 at 0x7FC9F3E42F40> ==> folder 2
I left the actual move into folders 1/2 as an exercise for you.
You could use Path.rename()
or many other options such as shutil.move()
.