What a silly Billy I am
, I had mis-spelt the directory name ie KAYPEC instead of KYPEC, thats why my attempt failed.
Change your 'ScriptName' to 'ScriptFile' (both of them), and it should work OK.
You were creating filename something like:- "D:\KYPEC\processed-D:\KYPEC\K.avi"
EDIT: You created eg "processed-D:\KYPEC\K.avi"
which when turned into full path became "D:\KYPEC\processed-D:\KYPEC\K.avi"