I have tested all these solutions and they work. I can now apply the script (now significantly improved) from within sam and also from the command line with ssam. I will keep these posts as examples. The only question that remains is how to add comments to this script. If I use # it is ignored.  ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T10b1d559ae7d981e-Mcd0f0d6b71a7467bcf04d8ba Delivery options: https://9fans.topicbox.com/groups/9fans/subscription