• dwilliscp (9/19/2012)


    Why is the following statement not deleting the backup files?

    EXECUTE master.dbo.xp_delete_file 0,N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\master',N'.bak',N'2012-09-12T16:25:36',1

    It finishes without error, in a second, but there are still files with the .bak at that file path.. dating back to Jan 2011.. when we loaded SQl on to this box.

    Probably because of the "." in the N'.bak' string. This is probably being done through a maintenance plan, and you don't include the "." when providing the extension for the file names.