"Find Unused Images" script search

As I am a newbie learning Eggplant I find I often capture images and then dont use them or make a new version of them, with a different name, that I end up using in my scripts.

A “Find Unused Images” option in the “Add Image” dialog (or it may be easier with a menu item/dialog of its own) and a delete button to get rid of that excess baggage would be nice. Maybe the best place for this option would be in the suite window “Images” tab especially since it already has a working preview feature and delete button in it.

The feature could scan the images in the /images folder associated with the current script, record the image names that where in that folder and then do a quick find in the script itself to make sure there was an occurrence of each in the current script then display the images that were NOT called by the script. Then if those images could be previewed and deleted by selecting them and pressing a delete button to get rid of them.

**If the above is a pain to code and impractical (I guess with subfolders in /images and with helper scripts that DID use the image when the original script didn’t it could be a pain) then even a “File” menu option to “Open Script’s /Images” that would open the images folder associated with the current script in the Finder - so that it was easy to delete your image goof-ups would be nice. As it is now it can be a real hassle to navigate down to the proper /Images folder especially if you have subfolders and get rid of the pesky image you don’t want.

OR it would be easier/cooler in my opinion to doubleclick an imagename in a script or click a button on the Toolbar of the script window to Find Image and have it open the folder associated with that image in the finder. Or have it open the suite Images Tab with that image selected.

Since Eggplant lives and breathes images (and I like that by the way :D) more options to keep those images organized, easily find the one you are using in a script in the filesystem, and delete extra unused ones, would be very nice.

Thanks,

Brad

A lot of good ideas here, some of which we may address in a future release. In the meantime, I’ve posted a new example script – called FindUnusedImages ! – in the Examples forum, which should help address your first concern.

The example script will find all images in a suite that don’t appear to be used by any scripts in that suite, and either delete them or move them safely into an “UnusedImages” folder, which you can delete later after you’ve had a chance to see if any of your scripts in other suites may have relied on those images.

The nice thing, of course, is that you can also modify and adapt this script to do something different with the images if you’d like.

I hope this is helpful! Thanks for your other ideas, too – I especially like the idea of selecting an image in a script and being able to display it in the Suite window. Hopefully we can find time to add something like that before too long.

Doug