I am working to automate a feature that should have existed on an e-reader but does not: removing cover image files when an ebook is deleted.
So far I have all the existing ebooks in a variable %epub (maybe not needed)
I also have all the existing cover images in a variable &coverimages
I have manipulated (search/replace) %coverimages to convert the list to contain the paths and names of the epubs that the covers go with.
Now I am stuck. I think I need some kind of for/next loop in which &coverimages is tested against the actual epub files and if there is not a match, the cover image file is deleted. Leaving aside the problem that I've lost my original list of cover images (I can always save that before search/replace), I can't seem to figure out a structure for the loop.
My goal is to attach this to another routine that determines and displays the calendar date such that when the date is "1" (i.e., once a month, at the beginning), any orphaned cover images will be deleted.
Any help with the loop process?