This code will scan the desktop from screenshots and then move them into a folder that will sort the screenshots based off the year and month they were taken.
This process however will not happen if the screenshot was renamed. This code was also made with mac os in mind and not tested with window or any other operating system.
THE CODE USES MY USER AS THE BASELINE AND YOU WILL HAVE TO CHANGE IT TO YOUR SPECIFIED USER
This code runs without any need to make folders yourself. You can simply run the code and the folders will be made if there isn't already a folder to place the screenshots.
This code can run from the terminal as well if you only want to download the cleaner.py file instead of the whole repository. Here are some examples of how to run the code in certain locations.
Home
python cleaner.pyDesktop
cd desktop
python cleaner.pyRepository
# replace 'justin' with your user and inside the code
cd /Users/justin/vscode/Desktop_Screenshot_Cleaner
python cleaner.py

