Copy and Paste the script to the SSMS query window. Navigate to the database and execute.
You can use the script in the job step also which you can use to refresh the database for repeated refresh of database requests.
Easy way to get the TLOg space Usage details
Query to find size of each file in a location