the complete and proper version of this script is in my last post in the thread linked. there were some issues without quotation mark placements but it is all good now.