title: The specified path, file name, or both are too long Powershell
body: <p>I have the below line in my powershell script in windows 7</p>
  
  <pre><code>$subFolderItems = Get-ChildItem $i.FullName -recurse -force | Where-Object {$_.PSIsContainer -eq $false} | Measure-Object -property Length -sum | Select-Object Sum
  </code></pre>
  
  <p>The problem I get this error <code>The specified path, file name, or both are too long</code> in some of the files.</p>
  
  <p>I looked into it and found some suggestions to add <code>\\?\</code> before the file path I tried as below and it's not working any advice?</p>
  
  <pre><code>$Base = '\\?\'
  $subFolderItems = Get-ChildItem $Base$i.FullName -recurse -force | Where-Object {$_.PSIsContainer -eq $false} | Measure-Object -property Length -sum | Select-Object Sum
  </code></pre>