script to addWeights on multiple files