create table #tempTabelInfo
(
name nvarchar(100) not null, fileid int, filename nvarchar(300), filegroup nvarchar(300), size nvarchar(300),
maxsize nvarchar(300),growth nvarchar(300), usage nvarchar(300)
)
go
sp_msforeachdb '
use [?];
if db_id()>4
begin
insert into #tempTabelInfo
EXEC sp_helpfile;
end'
select * from #tempTabelInfo
drop table #tempTabelInfo
go