title: How to delete files on the directory via MS SQL Server
body: <p>I am trying to delete a file from a directory inside windows using the following query, </p>
  
  <pre><code>exec xp_cmdshell 'del "C:\root\sfd_devtracker\'+@deletefile + '"';
  </code></pre>
  
  <p>When i execute this command it gives the following error,</p>
  
  <pre><code>Incorrect syntax near '+'.
  </code></pre>
  
  <p>In <code>@deletefile</code> variable i have the filename which i have to delete. What have i done wrong here? </p>