In order to delete old backup file You can try to use this:
DECLARE @TrnBckFileToDelete as varchar(255)
DECLARE ExpiredTranLog_CURSOR CURSOR FOR
SELECT msdb..backupmediafamily.physical_device_name
FROM msdb..backupset INNER JOIN msdb..backupmediafamily
ON msdb..backupset.media_set_id = msdb..backupmediafamily.media_set_id
WHERE msdb..backupset.expiration_date...