This FindUnusedImages script makes use of the FileDispenser example to step through all of the images in a suite. For each image, a second FileDispenser iterates over all of the scripts in the suite to see if any of them use that image.
If an image is found which doesn’t seem to be in use by any of the scripts in the suite, the script will perform an action – either deleting the script, or moving it into an “UnusedImages” directory within the suite. The script will optionally query you about each unused image that it finds, before taking action with that image.
Be aware that the search done by this script is fairly simple-minded, and also doesn’t take into account the fact that some images may be used by scripts in other suites. If your images are used by scripts in several suites, you may want to modify this script to examine the scripts in those suites as well.
Note: You’ll need version 1.5 (or later) of Eggplant, and have version 2 of the FileDispenser script in the same suite (or in a helper suite) to be able to successfully run this script. For your own protection, please make sure you make a backup of your suite, or at least your images directory, before running this script.