You can't use {sourcepath} etc. in the script directly.
If you are calling a separate .VBS file then you should pass {sourcepath} etc. as arguments to the script. An example which does that is here:
If you want to avoid having a separate .VBS file and want the script to exist in the button itself then, at the moment, you have to abuse the Rename Scripting feature. Information on that can be found here:
[[OBSOLETE] "Abusing" Rename Scripts to do other things with file info)