I think the problem is %PathToSelectedFile%, because you delete the file. Try to create a variable for the file name. Usually I had the same problem when the some how file name is incorrect.
I don't have an answer because I'm looking for the exact same functionality!!!
I want to retain the history of the original part but replace the file. I am going to try a few things today and I'll get back to you and let you know if I succeed.
I did not need to delete the original file - which I like! I just used a Shell Execute to copy the file.
copy "%PathToSelectedFile%" "%FileName%%Ext%" (variables are derived from rules on file naming)
I am copying the file I select over the top of another file, effectively replacing it's contents.
I found that copying the file "inside the vault" also worked but it threw an error that made it look like it did not work so I am going with the option of using a shell command. I have not put in all the error checking, tests required but this is working for me (I have everything named correctly).
Hope this helps you,