This uses indexes to locate the files.
SELECT [o].[crdate],
DATEDIFF(MINUTE, [o].[crdate], GETDATE()) AS [MinAgo],
[o].[name] AS [Tablename],
[i].[indid],
[i].[name] AS [IndexName],
[i].[rowcnt],
[i].[groupid],
[f].[name] AS [FileGroupName],
[d].[file_id],
[d].[physical_name],
[s].[name] AS [DataSpace]
FROM [sys].[sysobjects] [o]
JOIN [sys].[objects] [so]
ON [so].[object_id] = [o].[id]
JOIN [sys].[sysindexes] [i]
ON [i].[id] = [o].[id]
JOIN [sys].[filegroups] [f]
ON [f].[data_space_id] = [i].[groupid]
JOIN [sys].[database_files] [d]
ON [f].[data_space_id] = [d].[data_space_id]
JOIN [sys].[data_spaces] [s]
ON [f].[data_space_id] = [s].[data_space_id]
WHERE [is_ms_shipped] = 0
AND [i].[name] IS NOT NULL
ORDER BY [Tablename],
[IndexName],
[d].[file_id]
