Forum Discussion

Michael82353's avatar
Michael82353
Copper Contributor
Sep 26, 2024

screenshots program

I wrote a program using Python about a few moths ago to re-number my screenshots directory. I figured I would like to compensate for deletions in the default screenshot naming/numbering. After perfecting the program I've found that the screenshot function continues to name/number new screenshots from the latest screenshot ever existing.

 

For example, I had 25 screenshots, and deleted 16, 18, and 20 throughout the week. I run my program and it renames all of them using the default title 'Screenshot ().png', and I then have screenshots 1-22.

The issue:

When I create the next new screenshot, it's created as 'Screenshot (26).png' by default, instead of 'Screenshot (23).png'.

 

I'm still using Windows 10 Pro, so I'm unsure whether this is a feature of Windows 11. This should be a regular feature implemented in the OS.

Does anyone know how I might be able to reset the count each time I run my program?

Resources