Thank you hippy dave! This works great. At first I got errors regarding the PRINT lines so I cut them out of the script, after which it ran fine and trims like a champ. Weird though.
I think I was running into the same problem you were with the "Undefined symbols: "_truncate64", referenced...