Hi, hjh!
Whatever you desire can be achieved with a script. JSL will set you free!
As for how to go about writing the script to do so, I recommend a computer keyboard.
Seriously, though, you will need to consider several things before you plow into writing a script: how your data sources are structured and organized, the data analysis steps necessary, the output you desire, and how the script will be used. You will probably want to write a function to implement the dissimilarity measure you choose.
Depending on your answers to these questions (there's a helpful checklist in Chapter 11 of the Second Edition of JSL Companion), the script could be more or less difficult to write.
And, if you do get to choose, I would recommend a different dissimilarity measure than Bray-Curtis. Please reference the enclosed paper if you wish.
Good luck!