• It's on SP2, and I tried it with the same extension name as well.

    Before running my delete statement right now I have two files in a directory:

    AndersTest.bak backed up with SQL, creation time of 11/1/2007 @ 7:21 AM

    AndersTest_DB_20071101130.BAK backed up with LiteSpeed, creation time 11/1/2007 @ 2:14 AM

    After running:

    EXECUTE master.dbo.xp_delete_file 0,N'M:\Backups\AndersTest',N'bak', N'2007-11-01 07:30:22'

    The LiteSpeed file is left.

    To verify that it was not something in the LiteSpeed backup preventing it from being deleted, I created a file in notepad and saved it as AndersText.bak, this file did not get deleted either.

    To make sure security is not the problem I logged into the desktop on the server using the same login as the SQL Agent uses, I could then delete both the LiteSpeed backup and the fake backup file.

    My only conclussion is that xp_delete_file either looks at the content of the file, or looks into the backup information tables to see if it was backed up using SQL or not. I do believe the first to be the case since I have a job that sends me a list of the last backup data for each database and it clearly shows me the dates that LiteSpeed backed up the databases.