title: Powershell Array length
body: <p>I have written the below to error trap an empty array and it isn't working. Any ideas on the syntax I need?</p>
  
  <pre><code>$inputstring =   "MyOtherFile.rdl" "MyFile.rdl"
  $cleanstring =  $inputstring.replace(""" """,";")
  $filearray = $inputstring.split(";")
  
  if (echo @($filearray).length = "0")
  
  
  {$filearray.length
  'No Files Selected'
  
  exit}
  
  else
  {$filearray.length}
  </code></pre>
  
  <p>It is returning 2 for the array length but is still tripping the 1st part of the IF and saying no files selected.</p>