title: Difficulties creating an automatic file moving script (Powershell)
body: <p>I'll start by stating that i'm pretty new to Powershell but from what i hear it can be pretty powerful.</p>
  
  <p>with that said i'll specify the problem.</p>
  
  <p>i'm trying to write a Powershell script destined to run daily and check the total size of a number of specific folders, inside of each of these folders there are folders sorted by, let's say names.
  what i'm aiming for as the final result is a script that checks these folder's size and if it exceeds of the defined limit i set beforehand, their content will be moved to a pre-defined destination.
  The files will be moved to a folder with the same name as they were located in before.</p>
  
  <p>here is where I've gotten so far:</p>
  
  <pre><code>$Folder_A = "C:\Users\location_A"
  $Folder_B = "C:\Users\location_B"
  $Folder_C = "C:\Users\location_C"
  if((get-childitem $Folder_A , $Folder_B , $Folder_C | where {$_.name -eq name_1-or $_.name -eq $Name_2} | measure-object -property length -sum).sum -gt 30000) {write-host "success"}
  </code></pre>
  
  <p>OUTPUT?</p>
  
  <pre><code>You must provide a value expression on the right-hand side of the '-eq' operator.
  At line:1 char:63
  + if((get-childitem $input , $Temp , $Tiffs | where {$_.name -eq &lt;&lt;&lt;&lt;  I001 -or $_.name -eq I002} | measure-object -property length -sum).sum -gt 30000) {
  write-host "success"}
      + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
      + FullyQualifiedErrorId : ExpectedValueExpression
  </code></pre>
  
  <p>if anyone is able to help progress with this thing i would appriciate it alot!</p>
  
  <p>thanks in advance. </p>