https://puresourcecode.com/dotnet/sql/sql-server-find-current-location-of-data-and-log-file-of-all-the-database/
SQL SERVER – Find Current Location of Data and Log File of All the Database