Hi, This is the piece of code for undocumented proc xp_delete_file. It executes fine with dynamic SQL but does not work with execute command. Can anyone please give the reason for this ?
EXECUTE [master].dbo.xp_delete_file 0,@CurrentDirectory , 'bak' , @currentdate --Does not work
The problem is the with the datatype of the variable @CurrentDirectory. It cannot be passed as
But I doubt that there would be such big path for the directory. I guess
answered Feb 22 '12 at 04:44 AM