I am trying to delete a file from a directory inside windows using the following query,
exec xp_cmdshell 'del "C:\root\sfd_devtracker\'+@deletefile + '"';
When i execute this command it gives the following error,
Incorrect syntax near '+'.
In @deletefile
variable i have the filename which i have to delete. What have i done wrong here?