I could not reproduce your error. But, still try below code. If it works (ie, you do not receive any error :-D), then perhaps you are not providing proper parameters...
I have made few corrections in script. The script is in approval process. Once approved, please try this one. Meanwhile I have mailed a separate copy of script to...
Can you try executing below sql statement in another query window of SSMS. I suspect that the @BasePath location is not being accessible by SQL Server. If everything is right,...