Version 1.02 - updated script. I think it's a more complete thumbnail maintenance script now.
1. Script was a little slow to display the menu since I had it doing a significant amount of work in the thumbnail cache database prior to screen display. Instead of doing this cache info gathering work in "_Initialize", I changed the script to do it in a sub after menu display.
2. I made 3 new options that are based on your current folder location as opposed to the thumbnail database files though it will update the DB files as appropriate.
a. "Thumbnail Cache Clean-up [current folder & subs]" - This will essentially delete all the thumbnail cache from the current folder and all its subs and update the DB by comparing all the folders with those in the thumbnail cache.
b. "Build Thumbnails Cache [current folder & subs]" - This menu item will build a new data base of thumbs for the current folder and all its subs. It makes no difference if there were some folders which had pre-existing cache or not. It will (actually in this case it's XYplorer itself is doing the work) either write new thumbnail cache or write over ones (i.e., "dat2" and "dbit" files ) that already existed in the XY thumbnail folder.
c. "Refresh Existing Thumbnails Cache [current folder & subs]" - The last new menu item will do the same thing as the option above, build a thumbnail cache for the current folder and all its subs, but in this case it will only re-build the cache for the folders that already have thumbnail cache. So it's not making any new ones for any of those folders that didn't have a cache, only rebuilding the cache for the folders that had one. I think this option is very handy to keep the database trim. Remember thumbs will will stay in the DB when you move, delete and rename images so if you've done a lot of that, it may be much larger than it needs to be.
thumbnail_maintenance.png
Note if you select a folder which has many sub directories below it, it will take some time obviously to generate the new cache for each of those folders. Let it do it's work. You will get a message in the status bar that it's has been completed. Certainly don't be in the root of C:\.
Thanks Stef123 for making me realize that an option based on the current folder would be a good idea.
Next: I may work on performing the rebuilding of thumbnail cache in another instance of XY.
Please let me know if you have any issues. Thanks,
Ken
ThumbnailMaintenance_v1.02.zip