title: powershell filesize total from a directory listing
body: <p>I have created a directory list of files like this:</p>
  
  <pre><code>JPGS.LST:
  "L:\_Testing\2016-05-20 20.22.53.jpg"
  "L:\_Testing\2016-05-20 20.23.07.jpg"
  "L:\_Testing\2016-05-20 20.23.12.jpg"
  "L:\_Testing\2016-05-20 20.59.31.jpg"
  "L:\_Testing\2016-05-20 21.19.25.jpg"
  "L:\_Testing\2016-05-20 21.19.28.jpg"
  "L:\_Testing\2016-05-20 21.49.09.jpg"
  "L:\_Testing\2016-05-20 21.49.12.jpg"
  </code></pre>
  
  <p>From this list I want to get a total of all the file sizes - from the list.</p>
  
  <p>I'm using this list to reduce these images.  I want to run the script again to see total size of the same files after the reduction, so I have a before and after comparison.  Other examples I see use a powershell directory listing...I need to be able to use the input file to determine total size of files in the directory listing.</p>
  
  <p>I've tried:</p>
  
  <pre><code>$Files=Get-Content $Listfile
  $totalSize = ($Files | Measure-Object -Property Length -Sum Length).Sum 
  </code></pre>
  
  <p>but that's not producing expected results.  I'd like it to resolve to something like</p>
  
  <p><code>$TotalSize=12.5 MB</code> </p>
  
  <p>Obi Wan....you're my only hope!</p>