title: Exec master..xp_cmdshell 'Del...' is not working
body: <p>I'm trying to delete a excel file using <strong>xp_cmdshell</strong>, but is not working... I check the other questions of here but I can't solve my issue, I activated the advanced options of SQL SERVER to allow this sintax, but it show's me a error message like this: </p>
  
  <pre><code>No se encuentra C:\xampp\htdocs\Web_Seguimiento\Body\Upload\Files\Carga
  No se encuentra C:\WINDOWS\system32\Masiva
  NULL
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>---- To allow advanced options to be changed.
  EXEC sp_configure 'show advanced options', 1
  GO
  -- To update the currently configured value for advanced options.
  RECONFIGURE
  GO
  -- To enable the feature.
  EXEC sp_configure 'xp_cmdshell', 1
  GO
  -- To update the currently configured value for this feature.
  RECONFIGURE
  GO
  
  declare @sqlquery varchar(255)
  declare @name varchar(255)
  
  set @name = 'Carga Masiva Usuarios General.xlsx'
  set @sqlquery= 'Del C:\xampp\htdocs\Web_Seguimiento\Body\Upload\Files\'+@name +'' 
  exec master..xp_cmdshell @sqlquery 
  </code></pre>
  
  <p>Can anybody tell me what I do wrong, or how can I solve this issue...???</p>