I\'m trying to delete some files from a path where I have old log files which I could not do manually. So I have enabled XP_CMDSHELL in SQL Server 2016 and it did the work.