I have executed the following query in my local system and its works fine for normal file (files that not have read only attribute). But, when I tried this for read only file the sql server prompts 'Access is Denied'.
Declare @execmd varchar(150)
SET @execmd= 'xp_cmdshell ''del "' + '\\DFSPath\000000045401.doc'+ '"''';
Exec (@execmd)'
Property of the file to be delete SQL server error
Can anyone help me on this?