Memories
- Daniel Netwal
- Mar 23
- 1 min read
So now that I have all these clean and organized backups (I wish) I thought it would be fun to make a little script to create a daily curated look at pictures that were taken last year, 2 years, 3 years ago etc..

Pretty easy, single prompt on VSCode with CoPilot. <I need to make a script that scans all drives on my computer for pictures, jpg and png file types, and copies any file with a date created value of the current month and day, regardless of the year, into a new folder location that I specify.>
From there it was obvious that I needed to optimize somewhat. Narrowing down the search to know locations where my pictures live, OneDrive, iCloud, Backup drive, made it run faster, but since I really don't understand how Windows works, I was getting lots of strange temp photos in the results too.

Cleaning that up, now I thought it would be cool to make this into a scheduled task that runs at 3 am so it's ready to view when I get up in the morning. So added a line to delete yesterday's pictures before pulling out new ones.

Also, super important unless you want to lose all your photos in 365 days...

Short one but still really fun to work with AI to write some scripts!
コメント