DECLARE @backupFile sysname
SET @backupFile = 'xxx'
CREATE TABLE tmptable
(
LogicalName nvarchar(128),
PhysicalName nvarchar(260),
Type char(1),
FileGroupName nvarchar(128),
[Size] numeric(20,0),
[MaxSize] numeric(20,0)
)
INSERT INTO tmptable
EXEC('RESTORE FILELISTONLY FROM DISK = ''' + @backupFile + '''')