Did you accidentally rename everything to "IMG_001.py" or something? I can just picture opening a photo album and it's all Python scripts. Tuesday was a bad day to learn about loops.
Oh man, that reminds me of my friend who tried to automate renaming his vacation photos. He wrote a script that ended up naming every single file "family_trip.jpg" and overwrote them all. He lost a whole week of pictures from Hawaii. He doesn't code much anymore.