in reply to pass one or more directories into a file and use that as INPUT to a called script
Nowhere in your code are you processing the contents of the directories. See the Q&A How do I read a directory? for examples of how to do that.
🦛