My camera photos on my phone all end up in one big folder. I wanted to sort them by date taken in a simple format year-month format, YYYY-MM. I tried the application PhotoMove, but unfortunately, this simple requirement is only available with the PRO version, so instead, I've asked ChatGPT to create a PowerShell script for me.
- Download the Windows version from exif tool and unzip it into a folder. Make sure that the name is
exiftool.exe
(in my case, it had a weird nameexiftool(-k).exe
so rename it if that's the case). - Save the PowerShell script you can find below in the same folder.
- Open a PowerShell window (WIN+R and enter
powershell
) - Run the script
./sort.ps1
- Enter the folder name containing the original photo's (I did not test it with a folder that contains spaces)
The script will go through all your photo's, extract the EXIF date taken, and moves them to <SOURCE_FOLDER>YYYY-MM
(you cannot set the output folder, so it assumes the source folder is used). This may take a while.